Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting Attributes.Add onkeypress to work on Mozilla Fir
Message
 
 
À
21/04/2008 22:20:42
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires Web
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01312286
Message ID:
01312441
Vues:
16
>I am using this code to add an onkeypress attribute to a textbox control on a form:
>
>
>        loControlTextboxUsername.Attributes.Add("onkeypress", "return FormLoginFromInput(event)")
>
>
>However, on Mozilla Firefox, the attribute does not get added. So, this means .NET is smart enough to detect the browser and ignore that line. Or, is there something I am missing?
>
>And, if that is the case, then, what kind of approach should I use to make sure this will be added on all browsers or how to have it compliant with all browsers?

Are you sure the method is called OnKeyPress? I don't recall exactly, but AFAIK it's something else like OnKeyCode... (Don't have this book with me right now).
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform