 |
 |
 |
Dear All,<o:p></o:p>
<o:p> </o:p>
Can anybody tell me the difference between
XHTTP and the usual http?<o:p></o:p>
What is the difference between the
following two codes?? Which is better and preferred??<o:p></o:p>
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.<o:p></o:p>
<o:p> </o:p>
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..<o:p></o:p>
oXml = new
ActiveXObject("Microsoft.XMLDOM"); <o:p></o:p>
oXml.async = true; <o:p></o:p>
try <o:p></o:p>
{ <o:p></o:p>
window.document.focus(); <o:p></o:p>
oXml.load("ABC.aspx?Querystring=S”);<o:p></o:p>
oXml.onreadystatechange =
funPopulateSel;<o:p></o:p>
<span style='font-size:
12.0pt'> }<o:p></o:p>
<span style='font-size:
12.0pt'> catch(e)<o:p></o:p>
<span style='font-size:
12.0pt'> {<o:p></o:p>
<span style='font-size:
12.0pt'> alert(e);<o:p></o:p>
<span style='font-size:
12.0pt'> }<o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
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.<o:p></o:p>
<span style='font-size:
12.0pt'><o:p> </o:p>
<o:p> </o:p>
url="ABC.aspx?Querystring=S”<o:p></o:p>
xmlhttp.open("GET",url,true);<o:p></o:p>
xmlhttp.onreadystatechange=function()
{<o:p></o:p>
if
(xmlhttp.readyState==4) <o:p></o:p>
{<o:p></o:p>
oXml
= new ActiveXObject("Microsoft.XMLDOM"); <o:p></o:p>
oXml.load(xmlhttp.responseText);<o:p></o:p>
oXml.onreadystatechange =
funPopulateSel;<o:p></o:p>
}<o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
Which is better??<o:p></o:p>
I prefer the first one because only one
object is created J…<o:p></o:p>
The second case is how a typical <st1:place
w:st="on"><st1:City w:st="on">AJAX</st1:City></st1:place> works…may be
the response is not an XML. <o:p></o:p>
<o:p> </o:p>
Thanks And With Regards,<o:p></o:p>
Anil R.Nair<o:p></o:p>
<span style='font-size:
12.0pt'><o:p> </o:p>
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..
|
 | 

|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |