no1biscuit
Programmer
I have a text field that on the on click I validate the field. If the field is not correct, I alert the user and set the focus. Well in IE 5.5 and 6 it does not work. It sets the focus to the next field. In Netscape 4.0 and 4.76 it works great. What am I doing wrong. Here is a section of the code....
function Validate(broke, shot, formname)
{if (broke.value == ""
{alert("Please enter the broke amount!"
;
}
else if (broke.value < (shot/2))
{if (confirm("Only " + broke.value
+ "broke? Is this really correct?"
==false)
{broke.focus();
broke.select();
}
}
else if (broke.value > shot)
{alert("You cannot break
more than you shot"
;
broke.focus();
broke.select();
}
Response.Write "<tr><td><input type=textbox size=3 value='" & Broke
& "' maxlength=4 name=B" &
TEventrs.Fields(0) & "
onChange='Validate(this," & Shot & ", document.EditScores)'></td></tr>"
function Validate(broke, shot, formname)
{if (broke.value == ""
{alert("Please enter the broke amount!"
}
else if (broke.value < (shot/2))
{if (confirm("Only " + broke.value
+ "broke? Is this really correct?"
{broke.focus();
broke.select();
}
}
else if (broke.value > shot)
{alert("You cannot break
more than you shot"
broke.focus();
broke.select();
}
Response.Write "<tr><td><input type=textbox size=3 value='" & Broke
& "' maxlength=4 name=B" &
TEventrs.Fields(0) & "
onChange='Validate(this," & Shot & ", document.EditScores)'></td></tr>"