var name = document.getElementById('name').value;
var email = document.getElementById('email').value;
var subject = document.getElementById('subject').value;
var message = document.getElementById('message').value;
name = escape(name);
subject = escape(subject);
message = escape(message);
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null){
alert ("Browser does not support HTTP Request")
return
}
var url="http://clawz.goughy000.com/mail.php?from="+email+"&subject="+subject+"&message=Name:"+name+"%20Message:"+message
url=url+"&sid="+Math.random()
alert(url)
xmlHttp.onreadystatechange=stateChangedmail
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function stateChangedmail() {
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
document.getElementById("contentarea").innerHTML="Mail Sent, we will get back to you within 24 hours"
}
}
firefox is saying its got something to do with xmlHttp.open("GET",url,true)
Error: uncaught exception: Permission denied to call method XMLHttpRequest.open
Thanx in advance
You can not call another domain with the request.
Eric
oo thanx, all fixed now
i made a local file for the AJAX to call and that localfile used php to run the remote file