Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6773473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:40:21+00:00 2026-05-26T15:40:21+00:00

I am applying the following Javascript in a check form function:- var msg1=; function

  • 0

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:40:21+00:00Added an answer on May 26, 2026 at 3:40 pm

    In IE6 you need to use new ActiveXObject('Microsoft.XMLHTTP') to create the XHR object.

    var xmlhttp;
    try {
        xmlhttp = new XMLHttpRequest(); // real browsers
    } catch(e) {
        xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); // <=IE6
    }
    

    But you should really use jQuery, it does all the dirty work for you.
    Additionally dropping IE6 support wouldn’t be a bad thing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found applying the following function to a links onclose works to close Fancybox
I'm applying an XSLT stylesheet to the following XML file: <top xmlns=http://www.foo.com/bar> <elementA />
I am applying style to div using JavaScript it appears well at the first
I'm applying the following CSS: dl dd { font-size: 12px; font-weight: bold; } but
I have the following CSS class that I'm applying on a <td> tag: .bg
Consider the following class written in Java: class NonNegativeDouble { private final double value;
I have a ToggleButton to which I'm applying the following style <Style x:Key=ToggleButtonStyle TargetType=ToggleButton>
I have the following query to start with: var query = from p in
I'm applying the following filter to my data. string[] options = new string[2]; options[0]
I am following the tutorial here: http://www.aspfree.com/c/a/XML/Applying-XSLT-to-XML-Using-ASP.NET/2/ The tutorial shows how one converts xml

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.