Hi friends,
I created a simple javascript to validate start and end date.
if start date less than end date, system will display an error message.
But it does not wotking. however, alert function display correct date.
Thanks for any help!
Jim
******** codes
<script language="JavaScript">
function checkEntry() {
alert(document.optSel.p_startdt.value );
alert(document.optSel.p_enddt.value);
if (document.optSel.p_startdt.value > document.optSel.p_enddt.value
{
alert("Please enter start date less than end date");
document.optSel.p_startdt.focus();
return false;
}
else
{
return true;
}
}
</script>
I created a simple javascript to validate start and end date.
if start date less than end date, system will display an error message.
But it does not wotking. however, alert function display correct date.
Thanks for any help!
Jim
******** codes
<script language="JavaScript">
function checkEntry() {
alert(document.optSel.p_startdt.value );
alert(document.optSel.p_enddt.value);
if (document.optSel.p_startdt.value > document.optSel.p_enddt.value
{
alert("Please enter start date less than end date");
document.optSel.p_startdt.focus();
return false;
}
else
{
return true;
}
}
</script>