J
jkstinn
I apologize for another post about focus, but whatever I try just
doesn't seem to work. I appreciate any ideas that you could give me on
getting the focus back to the textbox after tabbing or clicking out.
Jason
function checkTime(timeVal) {
var hr, mn;
if (timeVal.length != 4)
{
alert("Time entered must be 4 characters: ex. 0130.");
document.setCond.elements['hwtime'].focus();
}
<INPUT TYPE="text" NAME="hwtime" ID="hwTime" SIZE=4 MAXLENGTH=4
VALUE="Time" onfocus='this.value="";'
onchange='checkTime(this.value);'>
doesn't seem to work. I appreciate any ideas that you could give me on
getting the focus back to the textbox after tabbing or clicking out.
Jason
function checkTime(timeVal) {
var hr, mn;
if (timeVal.length != 4)
{
alert("Time entered must be 4 characters: ex. 0130.");
document.setCond.elements['hwtime'].focus();
}
<INPUT TYPE="text" NAME="hwtime" ID="hwTime" SIZE=4 MAXLENGTH=4
VALUE="Time" onfocus='this.value="";'
onchange='checkTime(this.value);'>