|
| |
|
|
lsfphelpls
Posts: 443 Joined: 3/16/2005 Status: offline
|
I can not find the js function in the code ? - 4/23/2008 4:20:21
To below page there is a form with onsubmit return validation function well although validation works I can not find the js function in the code ? http://dimitriavilla.com/book_here.htm I want to add the validation function below to form so bookInDate<bookOutDate , how to include the two functions (& return keyword) to one onsubmit event handler ? [CODE]<script type="text/javascript"> function submitForm() { if (document.book.Email.value == "") { window.alert("You must enter your email address to submit form!"); return false; } var startDate = new Date(document.book.DATEFROM_YEAR.value,document.book.DATEFROM_MONTH.value-1,document.book.DATEFROM_DAY.value); // var startDate = new Date(document.forms[0].year.value,document.forms[0].month.value,document.forms[0].day.value); var endDate = new Date(document.book.DATETO_YEAR.value,document.book.DATETO_MONTH.value-1,document.book.DATETO_DAY.value); // var endDate = new Date(document.forms[0].toyear.value,document.forms[0].tomonth.value,document.forms[0].today.value); if (startDate.getTime() > endDate.getTime()) { // startDate.valueof() > endDate.valueof() window.alert("You must enter Start Date prior End Date to submit form!"); return false; } else return true; } // end function p261 gosselin book </script>[/CODE]
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|