Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Raising events

Status
Not open for further replies.

790213

Programmer
Sep 22, 2003
50
ZA
How do I raise an event in JS for IE?
 
Are you trying to create a custom event? Say ... an event that fires when the background colour is changed, for example.
 
Yes I'm trying to re-use an event that would have fired in other circumstances eg. You have an event (onchange) that executes when the selected item in a select box changes. Now instead of using the onchange event alone - which I'm doing - I want to raise the same event from a different place so that when I make changes to the functionality behind the event I don't have to change in two places ie. I want to call that same event from different places. My function expects an event like

function MyOnChange(evt)
{
...
}

evt being the event fired.

Do you understand?
 
Eh, no.

It sounds like you want to assign the same function to different events, but I'm not sure that's what you mean. If that is what you want then it's pretty easy but I'll wait for the clarification.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top