posted 21 years ago
Hi,
Please chk out out this simple html file code. The problem that is coming in IE is that if I change the value in the text box to say 1001 and press tab, onchange evnt is called and I see an alert and the value changes to 100. If I again change this value to 1001 and press tab, now the onchange evnt is not called, whereas it should have been!! The behaviour is normal in netscape but not in IE.
Kindly suggest a work around as I am stuck with this.
I can't use onblur because there would be proble, setting focus to the next field in my actual application
<html>
<head>
<title>Untitled</title>
<script language="JavaScript1.2">
function changed(fieldObj)
{
alert(fieldObj.name);
fieldObj.value = 100;
}
</script>
</head>
<body>
<form>
<input type="Text" name="inputField" value="100" onchange="changed(this)">
</form>
</body>
</html>