Shove IT
04-11-2003, 02:47 PM
Hi, I'm pretty new to JavaScript and I have a few questions regarding form validation, esp. checkboxes:
1. The system I'm working on has a screen where the user is required to select exactly 2 checkboxes out of 5. These checkboxes correspond to records pulled from a database. These threads have been of some help but I guess I don't know enough to modify them to make it work for my situation:
http://www.codingforums.com/showthread.php?s=&threadid=16608
http://www.codingforums.com/showthread.php?s=&threadid=8558
Right now the page only checks for the maximum number ( > 2) and displays an alert. I just need help making sure the minimum checked is 2 records. I'm thinking this check has to be on the button that takes the user to the next page?
2. If this is completed successfully (2 records checked), the user will go to a screen that requires that they input some information into 2 text boxes and click a button to do the same for the second record checked from the previous screen. However, if the information is unavailable, they can click a checkbox marked "Unavailable". What I want to do is display a yes/no? box if they check the box that warns them that any information entered in the text box will not be recorded to the database. The message box will either allow them to continue to the next record or uncheck the box and let them enter the data in the text box.
Hopefully this makes sense. If anyone is willing to help on either of these I can send you a link to the site I have so far. It requires a password and I'd rather not give it out on here, although it is all dummy data at this time. Thanks!
1. The system I'm working on has a screen where the user is required to select exactly 2 checkboxes out of 5. These checkboxes correspond to records pulled from a database. These threads have been of some help but I guess I don't know enough to modify them to make it work for my situation:
http://www.codingforums.com/showthread.php?s=&threadid=16608
http://www.codingforums.com/showthread.php?s=&threadid=8558
Right now the page only checks for the maximum number ( > 2) and displays an alert. I just need help making sure the minimum checked is 2 records. I'm thinking this check has to be on the button that takes the user to the next page?
2. If this is completed successfully (2 records checked), the user will go to a screen that requires that they input some information into 2 text boxes and click a button to do the same for the second record checked from the previous screen. However, if the information is unavailable, they can click a checkbox marked "Unavailable". What I want to do is display a yes/no? box if they check the box that warns them that any information entered in the text box will not be recorded to the database. The message box will either allow them to continue to the next record or uncheck the box and let them enter the data in the text box.
Hopefully this makes sense. If anyone is willing to help on either of these I can send you a link to the site I have so far. It requires a password and I'd rather not give it out on here, although it is all dummy data at this time. Thanks!