You are here: irt.org | FAQ | JavaScript | Form | Q1588 [ previous next ]
Try:
<form> <input type="text" onBlur="if (this.value == '') { alert('Please enter something'); setTimeout('this.focus()',1); }"> <input type="text" onBlur="if (this.value == '') { alert('Please enter something'); setTimeout('this.focus()',1); }"> <input type="text" onBlur="if (this.value == '') { alert('Please enter something'); setTimeout('this.focus()',1); }"> <input type="text" onBlur="if (this.value == '') { alert('Please enter something'); setTimeout('this.focus()',1); }"> <input type="text" onBlur="if (this.value == '') { alert('Please enter something'); setTimeout('this.focus()',1); }"> <input type="text" onBlur="if (this.value == '') { alert('Please enter something'); setTimeout('this.focus()',1); }"> </form>