By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,287 Members | 1,665 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,287 IT Pros & Developers. It's quick & easy.

how to validate the checkbox entry with user input with previous jsp page

P: 1
I have two jsp.
one is to get user input (order selection) say (2).
second page to select items thru check box but should not exceed the user input limit in first jsp.
if check box entry exceeds 2 then alert

how can we do it with DHTML.
Jun 13 '07 #1
Share this Question
Share on Google+
2 Replies


epots9
Expert 100+
P: 1,351
Hi sathyakala and welcome to TSDN,

a simple way could be to have your first jsp create a cookie that stores the value they entered. Then in the second page have the javascript read the cookie and store the value. Then for each checkbox have it them call a check function, so that that when more than 2 are selected have it thorw an alert.

if u need any further help, please post your code.
Jun 13 '07 #2

P: 67
Hi sathyakala and welcome to TSDN,

a simple way could be to have your first jsp create a cookie that stores the value they entered. Then in the second page have the javascript read the cookie and store the value. Then for each checkbox have it them call a check function, so that that when more than 2 are selected have it thorw an alert.

if u need any further help, please post your code.
There is another way store the values in an array then in the secod page you can limit the user depending on the users clicks i.e to the limit of the checked boxes.

This works good for multiple pages.
Jun 14 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.