I have created an asp page that has the following details:
[COLOR=DarkRed]frmStaDevAddEdit = form name
cboHourStart = drop-down menu for Start Time Hours (08 – 17)
cboMinuteStart = drop-down menu for Start Time Minutes (00 – 05 – 10- 15 – 20 …and so on to 55 )
txtTimeStart = Input Name (holds cboHourStart + cboMinuteStart)
cboHourEnd= drop-down menu for End Time Hours (08 – 17)
cboMinuteEnd = drop-down menu for End Time Minutes (00 – 05 – 10- 15 – 20 …and so on to 55 )
txtTimeEnd = Input Name (holds cboHourEnd + cboMinuteEnd)
I need some Javascript validation, that looks at the txtTimeStart & txtTimeEnd, & checks that txtTimeEnd is not the same or smaller than txtTimeStart.
So far I have
[COLOR=DarkRed]if(frmStaDevAddEdit.txtTimeStart.value == frmStaDevAddEdit.txtTimeEnd.value){
alert( “End time cannot be the same or earlier then the Start time!”);
return false;
}else{
//carry on
I would be very grateful if anyone could tell me how to adapt my code
I hope this all makes sense.
Thanks