XMLHTTP: Website Super Bond

xiaoxiao2021-03-06  90

Translation: BATMAN Introduction Many ASP developers want to use Microsoft's new features to support XML in their own website. Among them, some people find that you can use XML to decorate the site, but if you just use XMLDOM, you will lose some more important things. After all, XML is used as an image of an online data performance and data exchange. Although you can use XML to draw your data very satisfactory, developers have to use CGI to exchange data between browsers and servers unless you use an XML document using the browser and clients. Of course, the CGI can be completely competent from the perspective of conveying information, but if you use it with XML, let XML lose a lot of your own use. Fortunately, Microsoft provides a more effective way to transmit XML, although this method is largely not valued. There is a series of objects in the MSXML interpreter package provided by Microsoft, maybe no one will pay attention to the XMLHttpConnection object. In short, it allows you to open an HTTP connection to the server, send some data and retrieve some data. And all this can be implemented in a few pieces of scripts. Using XMLHTTP objects is usually XML data exchange, but other formatted data is also allowed. The standard mode of using this type of exchange type in a business program is a text string to the server that the client sends an XML format to the server, and then the server loads this string into an XMLDOM object and explains it, then return a section of HTML Give the client, or another XML code gives the client's browser to the client. In this way, for the delivery of information is very effective, especially when you use DHTML to allow you to dynamically display according to the return information. Examples are as follows ("Request_Method") == "Post") {var Req = Server.createObject ("Microsoft.xmld) ==" prop " "); req.async = false; req.Load (request); if (req.documentelement.nodeename ==" TIMESHEET ") {// is handled for data. . .

..... Response.write ("

Timesheet Updated! " Req.DocumentElement.text "");}}} else {%>
The response will be putin here