I am trying to write a script to do the follow:
there are 2 edit boxes... First i will write a number in the first edit box and after another number in the second box... In the second edit box it must not let me to write a number bigger than the number in the first edit box...
When i stop writing in the second edit box it must display a message to say that it must be lower than the number in the first edit box...
I try to do it but since i am a newbie in javascript i dont know what is the name of the event...
My try is:
<html>
<head>
<title></title>
</head>
<SCRIPT LANGUAGE="JavaScript">
function CHECK(){
if (parseInt(document.submitform.two.value) > parseInt(document.submitform.one.value))
{
alert("Please insert a smaller number than the first edit box ");
return "out of range";
}
}
</SCRIPT>
<body>
<FORM ACTION="next.asp" METHOD="post" name="submitform">
<input type = "text" name = "one" value=http://www.webdeveloper.com/forum/archive/index.php/"" size="20">
<BR>
<input type = "text" name = "two" value="" size="20">
</FORM>
</body>
</html>
Can please anyone help me...
Thanks in advance...
there are 2 edit boxes... First i will write a number in the first edit box and after another number in the second box... In the second edit box it must not let me to write a number bigger than the number in the first edit box...
When i stop writing in the second edit box it must display a message to say that it must be lower than the number in the first edit box...
I try to do it but since i am a newbie in javascript i dont know what is the name of the event...
My try is:
<html>
<head>
<title></title>
</head>
<SCRIPT LANGUAGE="JavaScript">
function CHECK(){
if (parseInt(document.submitform.two.value) > parseInt(document.submitform.one.value))
{
alert("Please insert a smaller number than the first edit box ");
return "out of range";
}
}
</SCRIPT>
<body>
<FORM ACTION="next.asp" METHOD="post" name="submitform">
<input type = "text" name = "one" value=http://www.webdeveloper.com/forum/archive/index.php/"" size="20">
<BR>
<input type = "text" name = "two" value="" size="20">
</FORM>
</body>
</html>
Can please anyone help me...
Thanks in advance...