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: David Perrell <davidp@hpaa.com>
Date: Mon, 21 Jul 2008 11:25:08 -0700
To: <www-dom@w3.org>
Message-ID: <HIEDLECHAFDEPLGKECDDIEIAAFAB.davidp@hpaa.com>

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

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

David Perrell
Received on Monday, 21 July 2008 18:26:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:59 GMT