Hi

All

I am trying to check the user enter time with current system.

If user enter the time less than the current system time then I want to display the alert box. But the code is not working.


Here is the code

<html>
<head>
<title>test</title>

<script type="text/javascript">
var d = new Date();

var curr_hour = d.getHours();
var curr_min = d.getMinutes();

var test = curr_hour + " : " + curr_min;
var test2=document.f1.t1.value;
document.write(test);
function check()
{
if (test<test2)
{

alert("please enter the time greater than current time");
}
}
</script>
</head>
<body>
<form name="f1">
<input type='text' name='t1' id='t1' value=''onblur='check()';>
</form>
</body>
</html>

please help me out


Thanks
M.Samiuddin