Re: "is not defined" errors only in Firefox
- From: "web.dev" <web.dev.cs@xxxxxxxxx>
- Date: 28 Feb 2006 11:21:28 -0800
forwardtrends wrote:
function setStyle(element, property, value) {[snip]
element = document.getElementById(element);
if(element.style) {element.style[property] = value;}
}
setStyle(handbookPop, 'display', 'none');
setStyle(handbookPop, 'display', '');
handbookPop is not defined because you are sending an undefined value
to your function setStyle function. Change it to the following
accordingly:
setStyle("handbookPop", "display", "none");
setStyle("handbookPop", "display", "");
handbookPop should be a string.
But when I use a <body onLoad="javascript:hideDiv();">
<a href="#" onClick="javascript:showDiv();">show div</a>
Javascript pseudo-protocol is a very bad practice. Try searching the
groups here, and you'll get many reasons as to why it is so.
.
- Follow-Ups:
- Re: "is not defined" errors only in Firefox
- From: forwardtrends
- Re: "is not defined" errors only in Firefox
- References:
- "is not defined" errors only in Firefox
- From: forwardtrends
- "is not defined" errors only in Firefox
- Prev by Date: "is not defined" errors only in Firefox
- Next by Date: Game
- Previous by thread: "is not defined" errors only in Firefox
- Next by thread: Re: "is not defined" errors only in Firefox
- Index(es):