P
PlutoPlanet
Hello World,
the code below shows 2 elements with "onClicks".
In IE all 3 values are alerted when clicking one of the elements
In FF only "this.id" is alerted on the table element and "this.id" and
"this.name" on the button element.
Is it possible to pass anything other than "this.id" (or a const
string) to a function which fired by onclick in FF?
In IE I can pass the whole object as argument: <td name="coolname"
onclick=myfunc( this );> and get the values in the function: function
myfunc( Owner ) { alert( Owner.name ); } --- that can make a lot of
things very easy...
Is there a way to get something like that work on FF?
<html>
<body>
<button name="buttonName" id="buttonId"
individualattribute="individualValue" onclick="alert( this.name + '\n'
+ this.id + '\n' + this.individualattribute );">click me</button>
<table border=1 name="tableName">
<tr name="trName">
<td name="tdName" id="tdId" individualattribute="individualValue"
onclick="alert( this.name + '\n' + this.id + '\n' +
this.individualattribute );">
also 4 testing
</td>
</tr>
</table>
</body>
</html>
the code below shows 2 elements with "onClicks".
In IE all 3 values are alerted when clicking one of the elements
In FF only "this.id" is alerted on the table element and "this.id" and
"this.name" on the button element.
Is it possible to pass anything other than "this.id" (or a const
string) to a function which fired by onclick in FF?
In IE I can pass the whole object as argument: <td name="coolname"
onclick=myfunc( this );> and get the values in the function: function
myfunc( Owner ) { alert( Owner.name ); } --- that can make a lot of
things very easy...
Is there a way to get something like that work on FF?
<html>
<body>
<button name="buttonName" id="buttonId"
individualattribute="individualValue" onclick="alert( this.name + '\n'
+ this.id + '\n' + this.individualattribute );">click me</button>
<table border=1 name="tableName">
<tr name="trName">
<td name="tdName" id="tdId" individualattribute="individualValue"
onclick="alert( this.name + '\n' + this.id + '\n' +
this.individualattribute );">
also 4 testing
</td>
</tr>
</table>
</body>
</html>