Click to See Complete Forum and Search --> : how to send xml using XMLHTTPRequest


giladasaf
December 10th, 2002, 03:47 PM
Hello...
Im trying to use
XMLHTTPRequest
and I'm confused...

client side:
script language="VBSCRIPT"
sub onload()
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")xmlhttp.open "get","http://localhost/test.aspx/search",false
xmltext ="<magazine>MSDN</magazine>"
Set xmldom = CreateObject("Microsoft.XMLDOM")
xmldom.loadXML xmltext
xmlhttp.send xmldom
xmlString = xmlhttp.responseText
msgbox xmlString
end sub
/script

server side:
private void Page_Load(object sender, System.EventArgs e)
{
SearchEngin SE = new SearchEngin("hhh");
XmlDocument docXml = SE.getResults();
Response.Write(docXml.InnerXml );
}


from some reson I get the xml I want but I also get the body of the server page : <html></html>

1. How can I _ONLY_ get the xml?
2. How can I call a certain fintion in the server - the only way it works to me is to put in the on load function.
3. How can I send empty msg to the server - I just need to get back an xml from the server that doesn't require any info from the client?

If you can solve my first question it will be very inportent to me
the second will help me understand the logic of the protocol
and the last... sometimes in life we have to accept a some garbage ;)

10 alot
Asaf