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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Msxml2.XMLHttp.4.0 won't post form values

Status
Not open for further replies.

cutnpaste

Technical User
Sep 21, 2002
3
NL
hi all,
I have the following problem:
when i want to post a value from the browser (IE6.0)like this:
Code:
var xh = new ActiveXObject("Msxml2.XMLHttp.4.0");
xh.open("POST","[URL unfurl="true"]http://localhost/test.php",false);[/URL]
xh.onreadystatechange=
function(){if (xh.readyState==4){alert(xh.responseText)}};
xh.setRequestHeader("Content-Type", "application/x-[URL unfurl="true"]www-form-urlencoded");[/URL]
xh.send("foo=somevalue");
with this being test.php:
Code:
<?php 
header (&quot;Content-Type: text/xml; charset=utf-8&quot;);
echo &quot;<?xml version=\&quot;1.0\&quot; ?><something>value is:$_POST['foo']</something>&quot;;
?>

I get the error :'the download of the specified resource has failed'. If I leave out 'xh.setRequestHeader(&quot;...&quot;);' I do get a response but no post value has been sent.

Any help will be greatly appreciated!
 
I currently have the same problem. Did you ever figure this out?
 
No I didn't. But the problem started when I upgraded from the juli 2002 version of msxml4.0 (don't know exact version number) to version 4.10.9404.0 released feb. 2003. I also installed win2k servicepack 3 around that time so that might have something to do with it.
Switching back the previous one didn't help so I presume something went wrong with the installation. I could reinstall win2k but it isn't a really urgent problem.
If you do find the cause I'd be interested to know though.
please post it here or mail to:
woud1234 at yahoo dot co dot uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top