Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Attaching events
Message
 
 
À
20/07/2001 14:58:52
Information générale
Forum:
Internet
Catégorie:
DHTML
Divers
Thread ID:
00533310
Message ID:
00533794
Vues:
9
Hi!

For ANY Java Script object you can attach ANY code function using the assignment. However, to reference function data type, DO NOT include the '()' after the function name. Quite simple. Just take a look how Java Script objects are deafined. The object consist of preoprties and... functions assigned to object. When object have event, assigning function to that event will cause firing of that function on event.

HTH.


>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.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform