Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

multi select boxes

 
saritha daggu
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one please help me with the multiselect boxes where if the user selects the first check box all the other checkbox should become disabled,and the this is not the case with the other check boxes except for the first checkbox. This is the JSP code i have with me

<logic:iterate id="regTypelookup" name="registration"
property="registrationTypeList">
<tr>
<td class="text">
<html:multibox name="registration" property="registrationTypeItems" styleClass="text" >
<bean:write name="regTypelookup" property="registrationTypeId" />
</html:multibox>
<bean:write name="regTypelookup" property="registrationTypeDesc" scope="page"/>
</td>
</tr>
</logic:iterate>

Please helpme withe the solution

Thank you
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64973
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will need to do that with JavaScript.

This post has been moved to a more appropriate forum.
 
saritha daggu
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the reply.Can you please help me with the javascript code to make the check boxes disable
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64973
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Break it down into the basic steps. What's the first thing that you need to do?
 
saritha daggu
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i just want the sample javascript code to disable the other checkboxes on selecting the first check box
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Play with this:



with the main check box



Eric
 
saritha daggu
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the reply But the above script is not working I just want to disable the other checkbox based on the selection of first check box

Thank you
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64973
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by saritha daggu:
Thank you for the reply But the above script is not working

Then put in some effort to debug why it is not working. JavaRanch is a learning site, not somewhere to go to get others to do your work for you.

Try to find out what's not working and ask specific questions regarding getting it working.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wanted you to try to figure it out. The sample code I gave checked all the other textboxes. So if you want to disable the boxes, you need to set the disabled property instead of the checked property.

Can I ask why are you recreating a radiobutton list?

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic