W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2008

Re: Using DOM to replace media attribute in the link tag on page load

From: Patrick Garies <pgaries@fastmail.us>
Date: Tue, 22 Jul 2008 04:46:33 -0500
Message-ID: <4885AC79.3090700@fastmail.us>
To: David Perrell <davidp@hpaa.com>
CC: www-dom@w3.org

David Perrell wrote:
>  Jonathan: |         mediaType.item(x).setAttribute("media", "all"); ^^^
>  should be: mediaType.item[x].setAttribute("media", "all");

The original code was correct. |mediaType[x]| (not |mediaType.item[x]|) 
is an ECMAScript alternative.

David Perrell wrote:
>  Are you changing multiple stylesheet links? Simpler to give the link
>  element an id and use getElementByID().

That would be |getElementById| (with a lowercase ā€œdā€).
Received on Tuesday, 22 July 2008 09:47:14 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:14 UTC