xomn
asked on
simple mootools AJAX call
using javascript with mootools,
I want a function that does a synchronous post ajax call with parameters,
and returns the resulting JSON
function simple_ajax(url, params) {
// url is a standard url
// params looks something like {'post_param1' : 'value1', 'post_param2' : 'value2'}
... what goes here? (probably uses toQueryString)...
return eval(result)
}
I want a function that does a synchronous post ajax call with parameters,
and returns the resulting JSON
function simple_ajax(url, params) {
// url is a standard url
// params looks something like {'post_param1' : 'value1', 'post_param2' : 'value2'}
... what goes here? (probably uses toQueryString)...
return eval(result)
}
new ajax(url,{postBody:params, onComplete: handlingFunction, update: 'targetDivId'}).request();
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
> eval("data="+result.respon seText+";" );
outch, hopefully there is no posibility for an attacker to manipulate this data ...
evil eval ...
outch, hopefully there is no posibility for an attacker to manipulate this data ...
evil eval ...
Forced accept.
Computer101
EE Admin
Computer101
EE Admin