Adding some updates to the ajax function and also, the Ajax call to the variable picker form
This commit is contained in:
@@ -1,3 +1,25 @@
|
||||
var getValue = function (list) {
|
||||
console.log(list.value);
|
||||
}
|
||||
|
||||
var getVariableList = function (queryText, proUid, varType){
|
||||
varType = varType.toLowerCase();
|
||||
var response
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url : "../processes/processes_Ajax",
|
||||
async : false,
|
||||
method: "POST",
|
||||
args : "action=getVariableList&process="+proUid+"&queryText="+queryText+"&type="+varType
|
||||
});
|
||||
oRPC.callback = function(rpc){
|
||||
console.log(rpc.xmlhttp.responseText);
|
||||
response = eval(rpc.xmlhttp.responseText);
|
||||
}.extend(this);
|
||||
|
||||
oRPC.make();
|
||||
console.log(response);
|
||||
}
|
||||
|
||||
leimnud.event.add(document.getElementById('type_variables'), 'change', function(event) {
|
||||
console.log('Dropdown Type of Variables');
|
||||
});
|
||||
@@ -11,8 +33,13 @@ leimnud.event.add(document.getElementById('search'), 'keypress', function(event)
|
||||
var tecla = event.keyCode;
|
||||
if(tecla == '13')
|
||||
{
|
||||
console.log('Has pulsado enter');
|
||||
return false;
|
||||
var list = getVariableList('nuev','2527075735085b447a58523099748463','system');
|
||||
console.log(list);
|
||||
for (var i in list){
|
||||
console.log(list[i]);
|
||||
}
|
||||
console.log('Has pulsado enter');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -20,6 +47,3 @@ leimnud.event.add(document.getElementById('type_variables'), 'change', function(
|
||||
console.log('Dropdown Type of Variables');
|
||||
});
|
||||
|
||||
function getValue(list) {
|
||||
console.log(list.value);
|
||||
}
|
||||
Reference in New Issue
Block a user