Why does this work in IE 5 but not Netscape 6?
-
The following code in IE works fine but won't in Netscape! Anyone got any ideas why please? Netscape never gets past the line beginning "var txtObj =" function Expand(txtID) { var txtObj = document.all(txtID + '_big'); if (txtObj.style.display == 'none') txtObj.style.display = ''; else txtObj.style.display = 'none'; } : : etc
-
The following code in IE works fine but won't in Netscape! Anyone got any ideas why please? Netscape never gets past the line beginning "var txtObj =" function Expand(txtID) { var txtObj = document.all(txtID + '_big'); if (txtObj.style.display == 'none') txtObj.style.display = ''; else txtObj.style.display = 'none'; } : : etc
try this: var txtObj = eval( 'document.' + txtID + '_big'); this should work unless your calling this id from a different layer. document.all[] really doesn't work in netscrap. You have to drill down to the elements you want. Hope this helps!!