[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XML HTTP and HTTP...

  • To: <xml-dev@l...>
  • Subject: XML HTTP and HTTP...
  • From: "Anil_R" <Anil_R@s...>
  • Date: Tue, 7 Feb 2006 20:20:19 +0530
  • Importance: normal
  • Priority: normal
  • Thread-index: AcYr9c1aJtsOtEXkQgS4Ll9kX+VjNw==
  • Thread-topic: XML HTTP and HTTP...

document.focus

Dear All,

 

Can anybody tell me the difference between XHTTP and the usual http?

What is the difference between the following two codes?? Which is better and preferred??

In both the cases I am sending a request from the client to the server and the server returns an XML doc. The XML Doc is a dynamic Doc created by a ASPX page.

 

Code 1. Here a HTTP Request is sent from the Client to the Server and loads a XML Dom. This is then used to populate data into a ComboBox..

oXml = new ActiveXObject("Microsoft.XMLDOM");

oXml.async = true;

try

{

window.document.focus();

oXml.load("ABC.aspx?Querystring=S”);

oXml.onreadystatechange = funPopulateSel;

            }

            catch(e)

            {

                        alert(e);

            }

 

 

Code 2. Here is another code where in an xhttp request is sent from client to server. The response is loaded in to a XML Dom and is used to populate data into a combo box.

 

 

url="ABC.aspx?Querystring=S”

xmlhttp.open("GET",url,true);

xmlhttp.onreadystatechange=function() {

if (xmlhttp.readyState==4)

{

oXml = new ActiveXObject("Microsoft.XMLDOM");

oXml.load(xmlhttp.responseText);

oXml.onreadystatechange = funPopulateSel;

}

 

 

Which is better??

I prefer the first one because only one object is created J

The second case is how a typical AJAX works…may be the response is not an XML.

 

Thanks And With Regards,

Anil R.Nair

 

DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated..


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.