I am applying the following Javascript in a check form function:-
var msg1="";
function check_si_form_info(form,mark,edit){
if(mark==10 || mark=="all"){
if(form.email.value==""){
si_check_email.innerHTML="";
si_check_email.style.height="0px";
form.email.style.backgroundColor="#FFFFFF";
}else{
var i=form.email.value.indexOf("@");
var j=form.email.value.indexOf(".");
if((i<0)||(j<0)){
si_check_email.innerHTML="The email address format is incorrect!";
si_check_email.style.height="auto";
form.email.style.backgroundColor="#FFD5FF";
return false;
}
else{
var email = form.email.value;
xmlhttp=new XMLHttpRequest(); //HERE!!!!
xmlhttp.open('get','si/check_si_email.php?email='+email,true);
xmlhttp.onreadystatechange = function(){
if(xmlhttp.readyState == 4){
if(xmlhttp.status == 200){
msg1 = xmlhttp.responseText;
if(msg1 == '1'){
si_check_email.innerHTML="email address has been used!";
si_check_email.style.height="auto";
form.email.style.backgroundColor="#FFD5FF";
}else if(msg1 == '2'){
si_check_email.innerHTML="";
si_check_email.style.height="0px";
form.email.style.backgroundColor="#FFFFFF";
}else if(msg1 == '3'){
si_check_email.innerHTML="";
si_check_email.style.height="0px";
form.email.style.backgroundColor="#FFFFFF";
}
}//200
}//4
}//onreadystatechange
xmlhttp.send(null);
}
if (msg1 == '1'){
return false;
}
}
}
}
In IE 7 or above, the scripts work perfectly well. But in IE6, the browser always mention the "XMLHttpRequest()" is not defined. If I wish to define it, where and what shall I input?? Thanks a lot!