I
Ivan
<html>
<head>
<script type="text/javascript">
function findvdn()
{
var vdnedit=document.getElementById("vdnfield").value;
//document.getElementById("vdnfield").focus();
if (8==vdnedit)
{
alert ("hi");
}
}
</script>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<input type="text" id="vdnfield" onkeypress= "findvdn();"
onchange="findvdn();"name="T1" size="20">
</body>
</html>
This is a very simple example just to demonstrate but when i type 8
doesnt appear straight away but when i type the next digit .. how can
i do it so that the alert appears while i type??Thanks
<head>
<script type="text/javascript">
function findvdn()
{
var vdnedit=document.getElementById("vdnfield").value;
//document.getElementById("vdnfield").focus();
if (8==vdnedit)
{
alert ("hi");
}
}
</script>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<input type="text" id="vdnfield" onkeypress= "findvdn();"
onchange="findvdn();"name="T1" size="20">
</body>
</html>
This is a very simple example just to demonstrate but when i type 8
doesnt appear straight away but when i type the next digit .. how can
i do it so that the alert appears while i type??Thanks