Can you please tell me if the following syntax is correct for an ajax post with sync that returns the response in a field named “text”?
[code]function saveTask() {
var saveTaskURL = “http://pz.southware.com/cgi-nl/NLNET15.BAT”;
var text="";
dhx.ajax().sync().post(saveTaskURL, $$(‘taskform’).getValues(), function(text, xml, xhr){
alert("text: "+text); //debug
if (text.substr(0,2) == “OK”) {
$$(‘taskform’).save();
alert(“Task Saved”); //debug
showGrid();
};
});
};
[/code]
The ajax post runs correctly - I can see in Firebug that the script ran properly and the server returned the correct response. But the alert doesn’t display and the remaining part of the script doesn’t run, although the browser doesn’t give any errors. Can you tell me why the script doesn’t continue past the ajax call?
Thanks.