SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard frank1's Avatar
    Join Date
    Oct 2005
    Posts
    1,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ajax not working in Firefox 2

    well we were using this function in our most ajax file

    Code:
    function GetXmlHttpObject()
    {
    var xmlHttp4=null;
    try
     {
     // Firefox, Opera 8.0+, Safari
     xmlHttp4=new XMLHttpRequest();
     }
    catch (e)
     {
     //Internet Explorer
     try
      {
      xmlHttp4=new ActiveXObject("Msxml2.XMLHTTP");
      }
     catch (e)
      {
      xmlHttp4=new ActiveXObject("Microsoft.XMLHTTP");
      }
     }
    return xmlHttp4;
    }
    it was working fine with all IE 6 and 7 and FF 1.5
    Now we are using Firefox 2.0.0 ...
    and all ajax has stopped working...no error
    we have zend studio...error console...firefox extension...it also shows no errors...but ajax action are not evoked..
    for eg onchange=showform()

    but when we do nothing happens

    please help

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)
    new XMLHttpRequest() works for me in Firefox 2
    Do you have an extension installed that's causing problems?

    Maybe try
    HTML Code:
    function GetXmlHttpObject()
    {
    var xmlHttp4=null;
    try
     {
     // Firefox, Opera 8.0+, Safari
     xmlHttp4=new XMLHttpRequest();
     }
    catch (e)
     {
     //Internet Explorer
     try
      {
      xmlHttp4=new ActiveXObject("Msxml2.XMLHTTP");
      }
     catch (e)
      {
      xmlHttp4=new ActiveXObject("Microsoft.XMLHTTP");
      }
     }
    alert(xmlHttp4);
    return xmlHttp4;
    }
    and see if the alert says "object"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •