DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Enormously annoying IE7 Compatibility problem - would love a little input!

  1. #1
    Join Date
    Feb 2009
    Posts
    2

    Exclamation Enormously annoying IE7 Compatibility problem - would love a little input!

    Hey everyone, I just found this forum and it looks like a good spot for some good language discussion. Anyway, I've been developing something for work and I can't seem to get it to work in IE7.


    Just the standard W3Schools AJAX function. I tried a few others, but this simply isn't working.

    Code:
    <script type="text/javascript">
    function ajaxFunction()
    {
    var xmlHttp;
    try
      {
      // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
      }
    catch (e)
      {
      // Internet Explorer
      try
        {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
      catch (e)
        {
        try
          {
          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
        catch (e)
          {
          alert("Your browser does not support AJAX!");
          return false;
          }
        }
      }
      }
    </script>

    Any input?

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Is it working in other browsers?

    Also, what do you mean by "not working"? What is happening when you run it in IE7?

  3. #3
    Join Date
    Feb 2009
    Posts
    2
    Yes - I tested it in Firefox - it worked great. By "not working", I get an error on the line request.open("GET", url, true) saying "Access is denied" from the Internet Explorer Javascript Console. And it DOES work in other browsers.

  4. #4
    Join Date
    Mar 2007
    Location
    Bangalore, India
    Posts
    247
    Access denied? Did you change the default security settings of the browser? Do you see a information bar on the top saying something like "This page is trying to use an ActiveX something something..."?

Similar Threads

  1. Replies: 0
    Last Post: 06-22-2006, 03:27 AM
  2. Problem in Date input from JSP page
    By natoskiii in forum Java
    Replies: 0
    Last Post: 03-31-2006, 05:01 PM
  3. Replies: 5
    Last Post: 02-17-2006, 10:12 AM
  4. Replies: 2
    Last Post: 04-18-2005, 12:01 PM
  5. input from keyborad problem
    By tranquillity in forum Java
    Replies: 3
    Last Post: 03-17-2005, 12:16 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