Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check Box Problem

Status
Not open for further replies.

liesak

Technical User
Oct 31, 2000
2
US
I am a beginner at HTML and am having a problem with check boxes I have a Dynamically generated list that I want the user to select upto to 4 selections. What I am wanting to do is once they have selected the four if they try to select a fifth one it will automatically uncheck the first selection. Is this even possible.
 
Dear liesak,

It should be possible. You could record the selection sequence data in client script code so that you can use the data when the events occur to provide your desired behavior.

Good luck
-pete
 
This is easy to do. The best way to do it is to use event-bubbling - adding an onclick event that calls a javascript function - add the onclick at the BODY tag level. Then, use window.event.srcElement.id to determine the html element that generated the event. Be sure to use the id tag on your checkboxes in addition to the name tag or the DHTML techniques will not work.
 
Thanks I think I understand what you mean. I will give it a try.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top