Asp Codes
ActiveX
ADO
Array
Code Snippets
Components
Data Access
Date Time
Files
Graphics
HTML Formatting
Mathematics
Miscellaneous
Sessions
SQL
Strings
Techniques
XML
Asp > XML sample source codes
HTTP requests
HTTP requests <% if (Request.ServerVariables("REQUEST_METHOD") == "POST" ) {//this part runs on the server, in response to the XMLHTTP post if Request<>"" then { var req= Server.CreateObject("Microsoft.XMLDOM"); req.async=false; req.load(Request); //load the XML sent by the browser Response.write(req.xml); } } else { %> <div id="div1"></div> <input type="button" onclick="sendData();" value="Send data"> <script> function sendData(){ var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.Open("POST", "http://www.yoursite.com/thispage.asp", false); xmlhttp.Send("<document>some XML data</document>"); divDisplay.innerHTML=xmlhttp.responseText; } </script> <% } %>
Privacy Policy
|
Link to Us
|
Links