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 I understand correctly you want to validate that the from date is before the to date.
I do not know if you are using plain JS or jQuery but for whichever you use retrieve the values from your inputs in the usual way.