When the users select the To Period as < From Period then an error message should be thrown to select a period >= From Period
When the user selects more than 12 months then a warning message should be displayed as "The report will take more time to display the dashboard".
The from prompt and to prompt are drop down and the use value is integer (e.g. jan 2013 =1 ,feb 2013=2)
I need a Javascript to validate and display the error message on selection of the dates. Before submitting the report.
If we put eshortie's code into a validation function and we define the submit event of the form, then it should work. Example: