Hi,
I have been studying JavaScript from one book. Once I was playing with the codes concerning the client-server site communication, I wanted to do a POST request with the code below (which uses IE ActiveX object XMLHttpRequest):
<script type="text/javascript">
var oRequest = HTTPRequestUtil.getXmlHttp();
var sRequestType = "post";
var sURLofRequest = "MyPage.aspx";
var bAsnychronously = false;
oRequest.open(sRequestType, sURLofRequest, bAsnychronously);
oRequest.send(null);
alert ('Status is '+oRequest.status+' ('+oRequest.statusText+')');
alert ('Response text is '+oRequest.responseText);
</script>
I have breakpoint on the PAGE_load eventhandler of the MyPage.aspx" page. I was expecting the execution will stop at that place when this HttpRequest occurs above. (It is called on a html button click).
The thing is, the request is done, the responseText is obtained (which was the xml content of the page) and no stop at the Page_Load method where I have put a breakpoint.
So, now I cannot understand the difference between calling .send() function with POST request type and submit() function on the call.
I would appreciate if you can explain the main differences briefly.
thanks!