|
|
 |
Re: FN-FORUM javascript problem for form validation
date posted 9th January 2001 20:22
This is the Correct answer....
function validForm(passForm) {
if ( passForm.password.value == "something" || passForm.username.value ==
"somethingelse") {
alert("you must enter a Password")
passForm.password.focus()
return false
Cheers
Kif
----- Original Message -----
From: [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Tuesday, January 09, 2001 5:03 PM
Subject: FN-FORUM javascript problem for form validation
> Is there an equivalent of "or" for javascript? I am trying to do a
textbox
> check to ensure an entry is made. I can get it to work for just one i.e
> password or username, but not both....it is kind of late!
> this is what I've tried to do so far:
>
> function validForm(passForm) {
> if (passForm.password.value == "")or(passForm.username.value == "") {
> alert("you must enter a Password")
> passForm.password.focus()
> return false
>
> cheers
> Rob
>
> ============================================================
>
> * Free listing for freelancers
> * Free to advertise jobs
> * Free jobs distribution service
> * Free database of 1000 freelancers
>
> Freelancers and Freelance Jobs
> http://www.freelancers.net
>
> To post to the Forum:
> [EMAIL REMOVED]
>
> To unsubscribe please email:
> [EMAIL REMOVED]
>
> If you have difficulties unsubscribing please email:
> [EMAIL REMOVED]
>
> To subscribe to the digest for this list or for further information please
visit:
> http://www.freelancers.net/forum.html
|
 |
|