Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to enable checkbox when checked in other checkbox dynamically

 
kittu basant
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have an application in jsp, where the I have 2 checkbox ( right side checkbox is disabled by default)created on either side of data dynamically (Data is created from the database till the number of data). I would like to enable right side checkbox only when i mark check in the left side checkbox.
Please let me know how to go about using javascript.

For instance

checkbox1 data1 checkbox1a
checkbox2 data2 checkbox2a
......
I tried doing it with javascript but was not able to,

Kindly provide a sample/similar example.


thanks in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65105
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take the time to choose the correct forum for your posts. This forum is for questions on portlets.

This post has been moved to a more appropriate forum.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65105
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by kittu basant:
I tried doing it with javascript but was not able to

Why not? If you have code that you are having trouble getting to work, please post it here so we can help you get it working. Be sure to use UBB code tags when posting code. And see the FAQ if you have trouble posting the code.
 
kittu basant
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
kittu basant
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please find the code above..The code consists retreval of tools from data base . The two check box indicates for selection of tool(leftside) and other selection of budgeted. This should be enabled only when you have selected the tool.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65105
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by kittu basant:
Please find the code above.
That is server-side code and not very helpful. As this is the HTML forum, it'd be best to post the generated HTML. Please make sure that it is well-formatted, and use UBB code tags.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic