Click to See Complete Forum and Search --> : compatibility problems -- please help!!


Dudsmack
10-24-2003, 02:25 PM
This works in IE but not Mozilla/Netscape:

function linkObject(objectName) {
if (document.getElementById)
{
tempObject = document.getElementById(objectName).style;
tempObject.surname = objectName;
tempObject.innerHTML = new document.getElementById(objectName).innterHTML;
return tempObject;
}

this works in all browsers::
function linkObject(objectName) {
if (document.getElementById)
{
return document.getElementById(objectName).style;
}

I need the functionability of the first (top) one. Why won't it work?!? Please help!!

Jona
10-24-2003, 02:33 PM
You forgot the closing brace in the first function (the }), and innterHTML is not a property...

[J]ona

Dudsmack
10-24-2003, 02:48 PM
sorry, typos, } is in my original code (i didn't cut-n-paste it and innter was changed to inner. Still not working in gecko browsers.....

Jona
10-24-2003, 02:51 PM
tempObject = document.getElementById(objectName).style;


Should be...


tempObject = document.getElementById(objectName);


[J]ona