content
property the xhr object will do this. However, I didn't find a lot of examples of how I was supposed to format the field.The documentation seems to indicate param=value, but that obviously wouldn't work. Below is an example of what works. Basic object literal format seems to do the trick. Just separate your name name:value pairs by commas and you should be good to go.
1: dojo.xhrPost(
2: {
3: url: 'ajax-student-test.php',
4: handleAs: "text",
5: timeout: 5000, // Time in milliseconds
6: content: { AppRequestType:"Initial Page Load" }, // Data to pass
7:
8: load: studentHandler, //Called on a successful response.
9: error: ajaxErrorHandler, // Called in an error case.
10: }
11: );
12:
No comments:
Post a Comment