hi all,
I have the following problem:
when i want to post a value from the browser (IE6.0)like this:
with this being test.php:
I get the error :'the download of the specified resource has failed'. If I leave out 'xh.setRequestHeader("..."' I do get a response but no post value has been sent.
Any help will be greatly appreciated!
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");
Code:
<?php
header ("Content-Type: text/xml; charset=utf-8");
echo "<?xml version=\"1.0\" ?><something>value is:$_POST['foo']</something>";
?>
I get the error :'the download of the specified resource has failed'. If I leave out 'xh.setRequestHeader("..."' I do get a response but no post value has been sent.
Any help will be greatly appreciated!