Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field Validation using JavaScript
Message
De
13/08/2001 20:35:56
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australie
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
Field Validation using JavaScript
Divers
Thread ID:
00543304
Message ID:
00543304
Vues:
50
Hi All,

I've come across a problem with validating fields in Javascript. I have a Dropdown on a webpage which allows the user to select a State for an address. If the State is left blank then an alert notifies the user to enter the state and the page is not submitted. It works fine in IE but in Netscape 4.7 & 6.0 if the state is empty the page is still submitted. If have similar validation on text fields and these work fine in Netscape, it's just dropdowns I'm having a problem with. Any ideas?
if (mywebpage.State.value == "")
{
    alert("Please enter a State.");
    mywebpage.State.focus();
    return (false);
}
I've come across a number of quirks with the way javascript works ( or doesn't work ) in different browsers. I'm thinking of doing my validation on the server instead of the browser due to the fact that with client side validation you have to account for the different versions of browser. Which option is the safest, client side or server side validation?

Thanks,
Gavin...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform