• Post Reply Bookmark Topic Watch Topic
  • New Topic

disabling /enablig check boxes

 
chamini prashakthi
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jsp table that have a column with checkboxes.
I make them default disable
when i click a button i want to enable them.
this is my code.



this is work when there is a text field but I have checkbox field.

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65417
100
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why aren't you using jQuery to make this much easier?
 
chamini prashakthi
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you provide an example???
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35535
402
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This code gets all the input elements that have a name starting with notifications and disables them:
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65417
100
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:This code gets all the input elements that have a name starting with notifications and disables them:

One correction: in jQuery 1.5 or later, you should use .prop() instead of .attr().
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35535
402
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear. I was trying to remember the syntax for "starts with" so hard that I forgot that changed!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!