Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xmlhttp.open gives me "Invalid Syntax" error

Status
Not open for further replies.

amigo02

Programmer
Feb 19, 2003
109
I have the following code in a javascript function

function fnAction(oButton){
var objXMLHTTP= new ActiveXObject("Msxml2.XMLHTTP.4.0");
var objXmlDOM=new ActiveXObject("Microsoft.XMLDOM");

try {
objXMLHTTP.open("POST",varStr ,false);
}
catch (errorObject)
{
alert(errorObject.description)
}
objXMLHTTP.send("");

//process the xml
...
...

objXMLHTTP=null;
}
when the page first loads and I click a button to call this function it works perfectly. But when I click the button second time without loading the page again I get "Invalid syntax" at the objXMLHTTP.open statement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top