07-11-2005, 11:16 PM
07-11-2005, 11:26 PM
Set up a condition IF/ELSE statement that redirects them to the page only if they enter a correct date. If its invalid, have it do nothing and alert the user that what they entered is incorrect. An alert does not stop actions from happening, but only "pauses" a function to alert the user of something. Once they click "OK", the function continues to run.
If you do alert the user their date is invalid, it is beneficial to have it clear the invalid date and focus on the field to allow them to enter a new one. For example:
alert('date is not valid, please enter a valid date!');
07-12-2005, 06:17 AM
it is beneficial to have it clear the invalid date
Not really. If the user just have a small typo, it is annoying that the input is cleared and he needs to enter it all over again.
07-12-2005, 03:13 PM
I suppose you could have it select as well, just personal preference really ;) . If people cant follow a format the first time, they should be punished. just kidding
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.