Hello,
I have a problem with getXMLHTTPinstance(). I made two js methods:
function SendNipToValidate(nip)
{
rnip = getXMLHTTPinstance();
rnip.open('POST', 'modules/Accounts/nipvalidator.php', true);
rnip.onreadystatechange = GetNipValidate;
var poststr = "nipvalidator=" + encodeURI( document.getElementById('nip_c').value ) ;
rnip.send(poststr);
}
function GetNipValidate()
{
if ((rnip.readyState == 4) &&(rnip.status == 200))
{
return rnip.responseText;
}
}
and simple PHP file:
<?php
echo 'Some response';
?>
When I call SendNipToValidate rnip.responseText isn't 'Some response' but some HTML tags. How can I fix it??


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks