[Javascript] dom/javascript question regarding Internet Explorer

Lee Bettridge lbettridge at twowaytv.co.uk
Fri Jul 20 10:37:51 CDT 2007


Thanks, but I'll just use document.title
Much easier.

-----Original Message-----
From: javascript-bounces at LaTech.edu
[mailto:javascript-bounces at LaTech.edu] On Behalf Of J. Lester Novros II
Sent: 20 July 2007 16:29
To: [JavaScript List]
Subject: Re: [Javascript] dom/javascript question regarding Internet
Explorer

Lee Bettridge wrote:
> That's exactly what I needed, thanks :)
> 
> Isn't it weird though, that you can access it through
>  document.title;
> 
> And not
>  document.getElementsByTagName("TITLE");

If you insist in doing it that way I would opt for 
document.getElementsByTagName("TITLE").item(0).firstChild.nodeValue
instead 
of messing about with the data property.

In the interests of completeness, I did a quick test with the code you
posted 
originally. Results are as follows.

Both xPloder 6 & 7 do not understand any of this. It seems the title
element 
has neither child nodes nor a nodeValue. [since 6 didn't work I haven't
even 
tried below v.6].

Another point of note is that the Fox can be satisfied with 
document.getElementsByTagName("TITLE").[0] instead of item(0); both
Safari 
and Opera insist on the use of the item method.

l8R lES
-- 
Claiming that [DRM] can ever be made secure [...] is like believing you
can
create a secure bank vault by drawing chalk lines on the pavement,
piling
the money inside and asking customers to "respect these boundaries".
http://www.supermarionation.tv                             - Jeremy
Allison
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
________________________________________________________
Two Way TV is the trading name of Two Way Media Ltd
Company Number: 4904168



More information about the Javascript mailing list