Click to See Complete Forum and Search --> : Event object in NS


Urs Wagner
07-03-2003, 09:53 AM
Hello

Who can help me?
I need to reformulate this in NS Javascript.
The IE script uses
function doOver() {
...
window.event.toElement
window.event.fromElement
..
}

Who knows the NS replacements for toElement and fromElement?

Thanks

Urs

Khalid Ali
07-03-2003, 10:03 AM
There may be a nother simpler way of doing this..what exactly to and from elements do..(not everybody works for MS ya know)

Urs Wagner
07-03-2003, 10:24 AM
They are realy practival.
In the onMouseOver event handler You check with the fromElement property over which element the mouse was before it was over the actual element (toElement).

Urs

gil davis
07-03-2003, 03:14 PM
Here is the tech note for JS 1.2 - http://developer.netscape.com/docs/technote/javascript/eventhandler/eventhandler.htm

Here is one for JS 1.3 - http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/event.html

A general guide - http://devedge.netscape.com/library/manuals/2000/javascript/1.3/guide/evnt.html

I don't think anything has changed in 1.5 other than the ability to add events to an object as part of the DOM.

Khalid Ali
07-03-2003, 10:39 PM
What you can probably do is create a an algorithm where you store one last event before the new one is created and once a new is created it will always be able to get the last event object hence will get that events src element...

Make sense????

gil davis
07-04-2003, 05:40 PM
Also, here is a Mozilla reference to DOM 2 events - http://www.mozilla.org/docs/dom/domref/dom_event_ref.html