I've a page that displays various drop down menus, one is process and this controls what is displayed in the second - Activities. There is also a time drop down menu. I now have to have a minimum and maximum time for the activities (maximum and minimum is different for all activities) if the users enter a time that is outside the scope an alert box should appear informing the user. Not sure how I do this, any ideas? Im using a stored procedure to populate the drop menus from the database.
coder91
0
Junior Poster
Recommended Answers
Jump to PostAre you trying to validate this client side or server side? If client side, you would have to store the min/max values maybe in various hidden input elements? Then use JavaScript/jQuery to validate the input.
Server side would seem to be easier...when the user selects the time and submits it …
Jump to PostWell, even "server-side" validation occurs client side. Its just ASP.net's way of providing validation controls.
I'm not sure exactly how you would interface this with the validation controls with regard to comparing with info from a DB. I havent done that personally, but there is information on MSDN on how …
Jump to PostAlso why not just use some jQuery/Ajax to send the values you want to check to an aspx page, check the results against the DB, then send the info back to the browser. Then take the appropriate action whether you get a true/false as a response for example.
Jump to PostYou can check it on the server, one way is via Ajax, but you can also allow the user to submit the page and then check. The down side is that this will require a post back. Not a big deal, but the purpose of the client side validation is …
Jump to PostSo since you mentioned you had a DB, I had assumed you already created the connections. The actual code you need depends on what type of DB you are connecting to, the tables that hold the data, and your controls on the page that you will access to compare the …
All 17 Replies
RvSon
-3
Newbie Poster
coder91
0
Junior Poster
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
coder91
0
Junior Poster
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
RvSon
-3
Newbie Poster
coder91
0
Junior Poster
coder91
0
Junior Poster
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
coder91
0
Junior Poster
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
coder91
0
Junior Poster
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
coder91
0
Junior Poster
coder91
0
Junior Poster
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.