[Javascript] Need help with Script

J. Lester Novros II lester at denhaag.org
Sat Jan 21 21:23:05 CST 2006


Dear Lee,

Lee Underwood wrote:
> I am trying to figure out why this script is not working in Internet 
> Explorer.

I use m$' pityful script debugger when testing pages in xPloder. On your page it 
threw an error about expecting an object in the flwg line:

   if (description.firstChild.nodeType == 3) {
       description.firstChild.nodeValue = text;
   }

An inserted alert showed me that 'description' was an object but had no id. When 
I subsequently alerted 'description.nodeName' it said 'META'.

Huh?!?

Then it dawned on me [I tackled this problem before] that xPloder is stupid 
enuff not to differ between 'name' and 'id' attribute namespaces. In this case, 
there is a <meta name="description" ... > tag in your document which, obviously, 
has no childnodes, hence the error.

Moral of the story: choose your id's wisely if you want your scripts to work in 
xPloder. In your case, rename your P element's id to something else than 
'description' [or remove the meta tag] and you're off.

l8R lES
-- 
We'll invest in a 100-page report [with] one page that will talk about something
negative and [m$] will then run a $100 million advertising campaign around one
page of a 100-page document and will ignore the other 99 pages.
                         Stuart Cohen, OSDL CEO on why not to collaborate with m$
                                                           http://www.denhaag.org



More information about the Javascript mailing list