Connecting Tech Pros Worldwide Forums | Help | Site Map

Ref:Ajax is not working in Mozilla Firefox

Familiar Sight
 
Join Date: Jul 2007
Posts: 138
#1: Dec 12 '07
Hai all,

Why ajax code is not working in Mozilla,same code is working in Internet explorer.

thanks,
Aswath.

gits's Avatar
Moderator
 
Join Date: May 2007
Location: Munich, Germany
Posts: 4,134
#2: Dec 12 '07

re: Ref:Ajax is not working in Mozilla Firefox


... ajax IS working in Moz/FF ... please post the code that makes the problem so that we may have a look at it and suggest you the fixes ...

kind regards
Familiar Sight
 
Join Date: Jul 2007
Posts: 138
#3: Dec 12 '07

re: Ref:Ajax is not working in Mozilla Firefox


Hai
Thanks for reply,
This is my code:

Expand|Select|Wrap|Line Numbers
  1. dpd_country.Attributes.Add("onChange", "return populatestates();")
  2. dpd_state.Attributes.Add("onChange", "return dummycity();")
  3. dpd_city.Attributes.Add("onChange", "return getplace();")
Im using 3 dropdownlists.and im applying ajax for that 3 dpd's.

Thanks,
Aswath.
gits's Avatar
Moderator
 
Join Date: May 2007
Location: Munich, Germany
Posts: 4,134
#4: Dec 12 '07

re: Ref:Ajax is not working in Mozilla Firefox


is that the code that is not working? ... it seems to add event-handlers to some nodes ... could you post the Add-method. do you use a framework? what exactly is not working? are the events called?

kind regards
Familiar Sight
 
Join Date: Jul 2007
Posts: 138
#5: Dec 12 '07

re: Ref:Ajax is not working in Mozilla Firefox


Hai,
Thanks for replay,
Im using .net1.1 so im writing code manually for ajax,im not using any ajax frameworks..

Thanks,
Aswath.
gits's Avatar
Moderator
 
Join Date: May 2007
Location: Munich, Germany
Posts: 4,134
#6: Dec 12 '07

re: Ref:Ajax is not working in Mozilla Firefox


ok ... so show the code that you use :) ... at least the one that is not working in FF

kind regards
Dasty's Avatar
Expert
 
Join Date: Nov 2007
Location: Slovakia
Posts: 101
#7: Dec 12 '07

re: Ref:Ajax is not working in Mozilla Firefox


As gits said, ajax is working in FF. The only difference is, how xmlhttprequest object is created. IE is using ActiveX while FF got regular object. Show us you code. If it is too long, paste at least part where are you creating XHR object.
Familiar Sight
 
Join Date: Jul 2007
Posts: 138
#8: Dec 12 '07

re: Ref:Ajax is not working in Mozilla Firefox


Hai Thanks for replay,
my code is

Expand|Select|Wrap|Line Numbers
  1. obj = GetXmlHttpRequest();    
  2.     if (obj!=null )
  3.      {
  4.  
  5.        obj.onreadystatechange = stateprocess;   
  6.         obj.open("GET","getcontact.aspx?id="+cid+"&status=0",false);
  7.               obj.send(null);     
  8.             }       
  9.  
  10.  
  11.         var xmlDoc=new ActiveXObject("Microsoft.XMLDOM")//Create the XMLDOM object
here im using activeXobject ,insted what i have to use..?

Thanks,
Aswath.
gits's Avatar
Moderator
 
Join Date: May 2007
Location: Munich, Germany
Posts: 4,134
#9: Dec 12 '07

re: Ref:Ajax is not working in Mozilla Firefox


hi ...

in your GetXMLHttpRequest()-method you should have something like this already. for the xml-doc-object have a look here

kind regards
Familiar Sight
 
Join Date: Jul 2007
Posts: 138
#10: Dec 12 '07

re: Ref:Ajax is not working in Mozilla Firefox


Hai
I followed ur link.I understood my problem,but i didn't get any sollution.here im retriving values from database and binding to dropdownlists.i don't know how to retriving data from database for mozilla....?any help plz..........

thanks,
Aswath.
gits's Avatar
Moderator
 
Join Date: May 2007
Location: Munich, Germany
Posts: 4,134
#11: Dec 12 '07

re: Ref:Ajax is not working in Mozilla Firefox


what is your particular problem? the examples in the links show you exactly what to do in case the browser is not IE ... its always the code without ActiveX-objects ...

kind regards
Reply


Similar JavaScript / Ajax / DHTML bytes