theEclipse
Programmer
I would appreciate any help anybody can provide me to debug this code. I cant seem to find anything on google when I search for the error, except for some other people having the same problem (however no fix is provided). Of course it works perfectly in FF, but fails completely in IE.
The goal is to do show/hide a table cell using the display property. The error I get is:
My Javascript function. The line highlited in red is the one IE points to as broken, and it indeed doesnt error if I comment it out. (I added the try/catch to try and keep IE from blowing up....)
And lastly, the place that the code is called:
If you want to see the code in action, check out this work-in-progress:
There is a server auth. for now: un:[tt]dev[/tt] pw:[tt]!@#$[/tt]
login on the left with [tt]ttuser@nowher.net[/tt] pw:[tt]2468[/tt]
Thanks!
Robert Carpenter
Remember....eternity is much longer than this ~80 years we will spend roaming this earth.
ô¿ô
The goal is to do show/hide a table cell using the display property. The error I get is:
Code:
Could not get the display property. Invalid argument.
My Javascript function. The line highlited in red is the one IE points to as broken, and it indeed doesnt error if I comment it out. (I added the try/catch to try and keep IE from blowing up....)
Code:
function toggleId(id){
try {
var elem = document.getElementById(id);
if (elem.style.display != 'table-cell'){
[COLOR=red]elem.style.display = 'table-cell';[/color]
} else {
elem.style.display = 'none';
}
} catch (e) {//fail gracefully
str = "";
for (i in e)
str += e[i] + "\\n";
alert(str);
alert(elem.style.display);
}
}
And lastly, the place that the code is called:
Code:
<td class="rowOdd">
<a href="" onclick="toggleId('row_f'); return false;">Edit</a><br />
</td>
</tr> <tr>
<td colspan="5" id="row_f" style="display:none;">
<form name="edit_f" method="POST" action="">
...
</form>
</td>
</tr>
If you want to see the code in action, check out this work-in-progress:
There is a server auth. for now: un:[tt]dev[/tt] pw:[tt]!@#$[/tt]
login on the left with [tt]ttuser@nowher.net[/tt] pw:[tt]2468[/tt]
Thanks!
Robert Carpenter
Remember....eternity is much longer than this ~80 years we will spend roaming this earth.
ô¿ô