07-12-2005, 12:16 AM
07-12-2005, 12:26 AM
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, 07: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, 04: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 © 2016 vBulletin Solutions, Inc. All rights reserved.