wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes How to enable checkbox when checked in other checkbox dynamically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to enable checkbox when checked in other checkbox dynamically" Watch "How to enable checkbox when checked in other checkbox dynamically" New topic
Author

How to enable checkbox when checked in other checkbox dynamically

kittu basant
Greenhorn

Joined: May 17, 2008
Posts: 11
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


regards,<br />kittu basant
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60822
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60822
    
  65

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

Joined: May 17, 2008
Posts: 11
kittu basant
Greenhorn

Joined: May 17, 2008
Posts: 11
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

Joined: Jan 10, 2002
Posts: 60822
    
  65

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to enable checkbox when checked in other checkbox dynamically
 
Similar Threads
how to enable a checkbox through javascript
help needed Regarding tree Structure
Displaying data
Dynamically created table's checkbox's value
How to enable checkbox when checked in other checkbox dynamically