WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Raising Javascript Events, Tim Fortney, November 10, 2003
     Re:Raising Javascript Events, Erik Arvidsson, November 14, 2003

Subject: Re:Raising Javascript Events From: Erik Arvidsson Date: November 14, 2003
This is possible. See the W3C DOM level 2 (and for IE5 see MSDN fireEvent)

erik



Is it possible in js to raise your own events

for example ....

var o = new myObj();

fucntion myObj {
[do sumfin]
myObj.rasieEvent('evt_objLoaded', this);
}

myObj.evt_objLoaded(evt, obj) {
alert('Object has been created!');
}

get the idea?

or do i just try to call a function wrpped in a try catch statement?

var o = new myObj();

fucntion myObj {
[do sumfin]
try {
evt_objLoaded(this);
} catch {};
}

evt_objLoaded(evt, obj) {
alert('Object has been created!');
}





Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX