Hello,
So I have an ajax script that runs:
Code:
function test() {
var xmlhttp;
if (window.XMLHttpRequest)
{
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{
// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("eemail").innerHTML=xmlhttp.responseText;
}
if (xmlhttp.readyState==3 && xmlhttp.status==200)
{
document.getElementById("mailtick").innerHTML="<img syle='vertical-align: middle;' src='images/icons/loading.gif' />";
}
}
xmlhttp.open("POST","inc/username.php",true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send('email=' + document.registration.email.value);
}
it runs great! but the problem is, when I try and set the 'mailtick' innerHTML to another picture from my username.php it doesn't work, any ideas how how to go about doing this securely?