PDA

View Full Version : [js]Check that either 1 of two fields is populated before submit


Paul Ferrie
03-02-2006, 04:48 PM
I have 2 fields in a form
email,
phone number,
I need to check wether either field is populated before i can allow submit.

how do i do that?

Cheers
Paul

Cota
03-02-2006, 05:28 PM
A simple way is to say, if textbox NOT equal to nothing...

if (textbox.text != "") {
//do stuff
}