AJAX will not working in Internet Explorer


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: AJAX will not working in Internet Explorer

  1. #1
    Join Date
    Dec 2007
    Posts
    0

    AJAX will not working in Internet Explorer

    AJAX will not working in Internet Explorer

    Currently am using IE 6.0 version
    But itís working fine in Mozilla Firefox 2.0.0.11 and Netscape

    The sample code:

    function getXmlHttpRequestObject()
    {
    if (window.XMLHttpRequest)
    {
    return new XMLHttpRequest();
    }
    else if(window.ActiveXObject)
    {
    return new ActiveXObject("Microsoft.XMLHTTP");
    }
    else
    {
    alert("Your Browser Sucks!\nIt's about time to upgrade don't you think?");
    }
    }


    Please let me know how to solve the issues.

    Thanks,
    Vishruta

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Welcome to DevX

    What is the error that you are getting?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  3. #3
    Join Date
    Mar 2007
    Location
    Bangalore, India
    Posts
    247
    Try using the following code:

    Code:
    function getXmlHttpRequestObject()
    {
      if (window.XMLHttpRequest)
      {
        return new XMLHttpRequest();
      }
      else if(window.ActiveXObject)
      {
        try
        {
          return new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch(e)
        {
          return new ActiveXObject("Microsoft.XMLHTTP");
        }
      }
      else
      {
        alert("Your Browser Sucks!\nIt's about time to upgrade don't you think?");
        return null;
      }
    }
    It has one additional object for new IE browsers. Please let us know what happened. Also give the details of your browser (brand and version) and the error you encounter.

  4. #4
    Join Date
    Mar 2009
    Posts
    1
    It may be because of Ajax caching which is present in Internet Explorer.

    Try this link :

    http://sameera-programming.blogspot....-explorer.html

  5. #5
    Join Date
    Mar 2007
    Location
    Bangalore, India
    Posts
    247
    Two things: (1) Its not Ajax caching, just regular caching that occurs in IE.
    (2) The sample doesn't yet make an Ajax call for any caching to occur.

Similar Threads

  1. KeyListener Not Working In Internet Explorer
    By StubruFreak in forum Java
    Replies: 0
    Last Post: 01-25-2006, 02:41 PM
  2. Replies: 2
    Last Post: 04-09-2005, 03:28 PM
  3. Detecting Flash in Internet Explorer.
    By Jose Rodz in forum Web
    Replies: 3
    Last Post: 02-13-2002, 06:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center