Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Attaching events
Message
De
20/07/2001 14:58:52
 
 
À
Tous
Information générale
Forum:
Internet
Catégorie:
DHTML
Titre:
Attaching events
Divers
Thread ID:
00533310
Message ID:
00533310
Vues:
32
I know that using javascript, you can do the following to attach an event to a particular method:
frm.myButton.onclick = myOnClick();
Does anyone know if there's a way to attach an event to a < style > defined class? Or a similar technique?

I've got some date controls that call a calendar or using Quicken(r) style entry (T,+,-, etc). There's usually more than one per page. I'd like to be able to do this without naming each control specifically or passing control reference/name to another function.

e.g. instead of
frm.dStart.onkeypress = dateKeyPress();
frm.dEnd.onkeypress = dateKeyPress();
something like a style definition
< style > dateCls {onkeypress:dateKeyPress()}
< /style >
...
< input class="dateCls">...
TIA.
Insanity: Doing the same thing over and over and expecting different results.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform