alagappanK
asked on
msxml4.dll Question
Hello,
I have an javascript function. I am using this function to post the xml to servlet. I installed the MSXML4 and it was working fine. All of sudden today it is giving me the following error message
C:\JScript\myscript.js(7, 2) msxml4.dll: The download of the specified resource has failed.
at this line "xmlhttp.Send(xmldoc);" in the following code.
function PostUser(xmldoc) {
var xmlhttp = new ActiveXObject("Msxml2.XMLH TTP.4.0");
xmlhttp.Open( "POST",
"http://mycompany.com/myServlet",
false
);
xmlhttp.Send(xmldoc);
return xmlhttp.responseXML;
}
I need to fix this sooner. because alot of other things are depending on this to work.
I appreciate your help. Please let me know.
thank you,
alagappanK
I have an javascript function. I am using this function to post the xml to servlet. I installed the MSXML4 and it was working fine. All of sudden today it is giving me the following error message
C:\JScript\myscript.js(7, 2) msxml4.dll: The download of the specified resource has failed.
at this line "xmlhttp.Send(xmldoc);" in the following code.
function PostUser(xmldoc) {
var xmlhttp = new ActiveXObject("Msxml2.XMLH
xmlhttp.Open( "POST",
"http://mycompany.com/myServlet",
false
);
xmlhttp.Send(xmldoc);
return xmlhttp.responseXML;
}
I need to fix this sooner. because alot of other things are depending on this to work.
I appreciate your help. Please let me know.
thank you,
alagappanK
ASKER
No. Its a common servlet for the company. I just tried to load it in the browser. It is not showing any thing. This servlet is functioning with the MQ Series. the xml I am sending this servlet, goes to the MQSeries queue and then the servlet will pick up this xml and process it and return the result xml.
thank you,
alagappanK
thank you,
alagappanK
maybe connecttion speed to the server today is bad, and you don't get readyState:
try this:
========================== ========== ========== ========== =
<script>
var xmlhttp=null;
function PostUser(xmldoc)
{
xmlhttp = new ActiveXObject("Msxml2.XMLH TTP.4.0");
xmlhttp.Open("POST", "http://mycompany.com/myServlet", false);
xmlhttp.onreadystatechange =HandleSta teChange;
xmlhttp.Send(xmldoc);
}
function HandleStateChange()
{
alert("xmlhttp.readyState= "+xmlhttp. readyState );
if (xmlhttp.readyState==4)
{
alert(xmlhttp.responseXML) ;
}
}
</script>
try this:
==========================
<script>
var xmlhttp=null;
function PostUser(xmldoc)
{
xmlhttp = new ActiveXObject("Msxml2.XMLH
xmlhttp.Open("POST", "http://mycompany.com/myServlet", false);
xmlhttp.onreadystatechange
xmlhttp.Send(xmldoc);
}
function HandleStateChange()
{
alert("xmlhttp.readyState=
if (xmlhttp.readyState==4)
{
alert(xmlhttp.responseXML)
}
}
</script>
Hey devic, could you perhaps look at the last question here too?
https://www.experts-exchange.com/questions/20775977/URGENT-How-to-rewrite-an-xml-file-before-saving-it-in-ASP-MSXML.html
thanks
https://www.experts-exchange.com/questions/20775977/URGENT-How-to-rewrite-an-xml-file-before-saving-it-in-ASP-MSXML.html
thanks
ASKER
I just run the script with what you given, and for alert() I use the following function
function alert(str) {
WScript.Echo(str);
}
I am getting the following error
xmlhttp.readyState=2
xmlhttp.readyState=3
xmlhttp.readyState=4
C:\JScript\myjscript.js(92 , 4) Microsoft JScript runtime error: Type mismatch
The type mismatch is in the alert Function. (WScript.Echo(str);)
Is my alert function is wrong ??
please let me know.
thank you,
function alert(str) {
WScript.Echo(str);
}
I am getting the following error
xmlhttp.readyState=2
xmlhttp.readyState=3
xmlhttp.readyState=4
C:\JScript\myjscript.js(92
The type mismatch is in the alert Function. (WScript.Echo(str);)
Is my alert function is wrong ??
please let me know.
thank you,
I would not call it alert. . But anyway try
if (str) WScript.Echo(str);
if (str) WScript.Echo(str);
hi mplungjan, ok i look this.
must be js? or i can use vbs.
for asp i use always vbs.
must be js? or i can use vbs.
for asp i use always vbs.
ASKER
Hello devic,
Now its working fine. Can you please tell me why my original code is not working. But After I include this
HandleStateChange()
it works fine. What is the coding standard. Do you think I should include the HandleStateChange() in my code.
please let me know.
I appreciate your help
alagappanK
Now its working fine. Can you please tell me why my original code is not working. But After I include this
HandleStateChange()
it works fine. What is the coding standard. Do you think I should include the HandleStateChange() in my code.
please let me know.
I appreciate your help
alagappanK
Sorry AlagappanK for commenting in your question: Devic: Yes please JS only. Or vbs I can convert.. But I see now more people are commenting. It was quiet for many days
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
alagappanK, how are you?
ASKER
Good Morning devic,
Thank you for your help. I truly appreciate it.
alagappanK
Thank you for your help. I truly appreciate it.
alagappanK
in the browser?