Here is another bump in the road when I tried to upload data to the server by utilizing xhrPost. Now, in xhrPost, the data that we meant to send to the server is put in the postData container. I tried to send a dynamic data, say ID, which had been generated by javascript code to server by the following code :
dojo.xhrPost {
handleAs : “json”,
url: “http://destination_server/file_handler.php”
postData : “ID=”+id,
and..so..on..and..so…on
}
This method was a failure. Somehow, that postData reject to accept “id” (where “id” was a javascript variable. So, instead of using the above code, I used:
data=”ID=”+id
dojo.xhrPost {
handleAs : “json”,
url: “http://destination_server/file_handler.php”
postData : data,
and..so..on..and..so…on
}
And, it works.