Iamba
01-26-2006, 03:26 PM
I have a problem where:
function myfunction(element, htmlLocation){
var element = document.getElementsByTagName(element);
alert(element);
Is returning [object HTMLCollection] in firefox and only [object] in explorer.
"element" in this case is a <div> tag I have dynamically written a table from a string. The table has already been created by the time this function has been called and the purpose of this function is to apply some code to this div tag to create a "tooltip" hover for the table headers. This works in FireFox 1.5, but not in IE 6 and I assume the problem is in the different values I get for "element".
I.E. is returning the error
Error 'document.element' is null or not an object
any suggestions on the syntax for making this work in both browsers?
function myfunction(element, htmlLocation){
var element = document.getElementsByTagName(element);
alert(element);
Is returning [object HTMLCollection] in firefox and only [object] in explorer.
"element" in this case is a <div> tag I have dynamically written a table from a string. The table has already been created by the time this function has been called and the purpose of this function is to apply some code to this div tag to create a "tooltip" hover for the table headers. This works in FireFox 1.5, but not in IE 6 and I assume the problem is in the different values I get for "element".
I.E. is returning the error
Error 'document.element' is null or not an object
any suggestions on the syntax for making this work in both browsers?