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.
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.