This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes jQuery functionality is not working on firefox browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jQuery functionality is not working on firefox browser" Watch "jQuery functionality is not working on firefox browser" New topic
Author

jQuery functionality is not working on firefox browser

sunil langeh
Ranch Hand

Joined: Sep 04, 2007
Posts: 88
Hi friends , I am putting the below mentioned Jquery in code, its working fine on IE but not on Firefox, Can anyone help me??


Thanks
Sunil (SCJP 5)
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Are there any errors in the console?

If the function being called? Have you looked at each part of the jQuery line and see if it is working?



Than after you do that you should look at attr and prop()

Eric
sunil langeh
Ranch Hand

Joined: Sep 04, 2007
Posts: 88
Hi Eric,
Thanks for the quick reply, I tried as you suggested but still its not working, Jquery is not showing any results while clicking on the checked box for Firefox, but for IE its resulting something like this:
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61456
    
  67

Post an SSCCE.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You probably want change and not click.

Eric
sunil langeh
Ranch Hand

Joined: Sep 04, 2007
Posts: 88
Hi Eric,
I have implemented the code like: and its start working in FireFox too, but the problem is that, all the boxes are not get checked on first click, its getting checked on 2 clicks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61456
    
  67

Post an SSCCE.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
sunil langeh wrote:and its start working in FireFox too, but the problem is that, all the boxes are not get checked on first click, its getting checked on 2 clicks


Because you are adding the click event AFTER you click!

* Click one adds the jQuery click
* click 2 adds the jQuery event again and calls the jQuery event added in click one
* click 3 adds the jQuery event and calls the jQuery event added in click one and calls the jQuery event added in click two

Eric
sunil langeh
Ranch Hand

Joined: Sep 04, 2007
Posts: 88
Eric Pascarello wrote:
sunil langeh wrote:and its start working in FireFox too, but the problem is that, all the boxes are not get checked on first click, its getting checked on 2 clicks


Because you are adding the click event AFTER you click!

* Click one adds the jQuery click
* click 2 adds the jQuery event again and calls the jQuery event added in click one
* click 3 adds the jQuery event and calls the jQuery event added in click one and calls the jQuery event added in click two

Eric


So what should i do eric to handle this, Please suggest ..
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Only use jQuery to add the event on document ready.

Eric
sunil langeh
Ranch Hand

Joined: Sep 04, 2007
Posts: 88
Eric Pascarello wrote:Only use jQuery to add the event on document ready.

Eric


Still not working
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Show your code
sunil langeh
Ranch Hand

Joined: Sep 04, 2007
Posts: 88
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jQuery functionality is not working on firefox browser