You are here: irt.org | FAQ | JavaScript | Form | Q1558 [ previous next ]
Try:
<form onSubmit=" if (this.box1.value != '') this.action == 'box1.cgi'; else if (this.box2.value != '') this.action == 'box2.cgi'; else if (this.box3.value != '') this.action == 'box3.cgi'; else if (this.box4.value != '') this.action == 'box4.cgi'; else { alert('Please fill something in'); return false; } return true;"> <input type="text" name="box1"> <input type="text" name="box2"> <input type="text" name="box3"> </form>