Ajax Request Returns Undefined Result
i have a problem with Ajax Request ( Basic function ) here's ajax function function ajax(){ var activexmodes=['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP'] if (window.ActiveXObject){
Solution 1:
You never returned a value from _2xm.load
, so the function implicitly evaluates to undefined
.
You return values only from the anonymous function callback bound to req.onreadystatechange
, which fires at some later stage, asynchronously, long after your function call to _2xm.load
has finished.
Perhaps you should consider a synchronous request.
Post a Comment for "Ajax Request Returns Undefined Result"