need help!!..it seems new Ajax.Request
is not recognized based on the debug....
tried some of the recommendations online but not working..cache=false
etc...
Thanks!
if (init) {
init = false;
param = "init=" + true;
param = encodeURI(param.replace(/^\s+|\s+$/g, ''));
setLastRequestTimestamp(); //ryan's trial
new Ajax.Request("downstocking_apply_async.do", {
onSuccess: function(transport) {
if (!isHangingRequest()) {
alert("initUpdateScanArea");
initUpdateScanArea(transport.responseText);
setLastRequestTimestamp();
} else {
if (signalOnScan() == 1) {
alert("<fmt:message key="
message.signal_scan_off " bundle="
$ {
application
}
"/>");
return;
}
alert("<fmt:message key="
message.signal_downstock_suspend " bundle="
$ {
application
}
"/>");
doSuspend();
}
},
onFailure: function(transport) {
if (!isHangingRequest()) {
document.downstockingForm.action = "downstocking_apply_async.do?" + param;
if (signalOnScan() == 1) {
alert("<fmt:message key="
message.signal_scan_off " bundle="
$ {
application
}
"/>");
return;
}
setLastRequestTimestamp();
document.downstockingForm.submit();
} else {
if (signalOnScan() == 1) {
alert("message");
return;
}
alert("message");
doSuspend();
}
},
parameters: param,
asynchronous: "true"
});
}
found the solution...a custom js library that was imported is creating confusion with prototype js Removed the custom library and it works now... thanks!