battleangela
Technical User
Hi
I have been trying to verify and see if I can get the XMLHttprequest for certain browsers and starting of ajax. I know their is a problem but can not locate it. Can someone please review my code ?
<html>
<head>
<title>Ajax at work</title>
<script language= "javascript">
varXMLHttpRequestObject=false;
if(windowXMLHttpRequest){
XMLHttpRequest = new XMLHttpRequest();
}else if (window ActiveXObject){
XMLHttpRequest = new ActiveXObject("MicrosoftXMLHttpRequest");
}
if(XMLHttpRequestObject){
document.write("<h1>Object created</h1>");
}
else{
document.write("<h1>Your Browser does not support Ajax.</h1>);
}
</script>
</head>
<body>
</body>
</html>
I have been trying to verify and see if I can get the XMLHttprequest for certain browsers and starting of ajax. I know their is a problem but can not locate it. Can someone please review my code ?
<html>
<head>
<title>Ajax at work</title>
<script language= "javascript">
varXMLHttpRequestObject=false;
if(windowXMLHttpRequest){
XMLHttpRequest = new XMLHttpRequest();
}else if (window ActiveXObject){
XMLHttpRequest = new ActiveXObject("MicrosoftXMLHttpRequest");
}
if(XMLHttpRequestObject){
document.write("<h1>Object created</h1>");
}
else{
document.write("<h1>Your Browser does not support Ajax.</h1>);
}
</script>
</head>
<body>
</body>
</html>