C
Csaba2000
How do I achieve the following in javascript, the
emphasis being on the NN (6.1) 'event' parameter that
needs to be declared?
This is the current method - works just fine:
<TABLE border id='myTable' onmouseover="tableMoused(event)">
But, because I may or may not want myTable subject to being "Moused",
I want to have something like:
<TABLE border id='myTable'>
<SCRIPT type="text/javascript">
function prepareForMousing() {
var myTable = document.getElementById('myTable');
myTable.onmouseover = tableMoused;
}
</SCRIPT>
where
function tableMoused(evt) {
var e = window.event || evt;
....
}
Now, all this is fine for IE (5.5), but can anyone explain how this is
supposed to be made proper for Netscape (and Opera)?
The point being, how can NN know that it should pass the
event object along as that first param?
Thanks,
Csaba Gabor from New York
emphasis being on the NN (6.1) 'event' parameter that
needs to be declared?
This is the current method - works just fine:
<TABLE border id='myTable' onmouseover="tableMoused(event)">
But, because I may or may not want myTable subject to being "Moused",
I want to have something like:
<TABLE border id='myTable'>
<SCRIPT type="text/javascript">
function prepareForMousing() {
var myTable = document.getElementById('myTable');
myTable.onmouseover = tableMoused;
}
</SCRIPT>
where
function tableMoused(evt) {
var e = window.event || evt;
....
}
Now, all this is fine for IE (5.5), but can anyone explain how this is
supposed to be made proper for Netscape (and Opera)?
The point being, how can NN know that it should pass the
event object along as that first param?
Thanks,
Csaba Gabor from New York