document.write() works fine in XHTML documents unless you serve the document with an XHTML MIME type, which is rarely done in practice. If you are doing that you must avoid document.write(). I'm a big fan of document.write(). It lets you accomplish some things very cleanly that you can't do at all with the DOM. Of course, WRT Derba's code, document.write() can not be used in a load() event. It can only be used while the page is loading. -Mike
_____ From: Hector Virgen @Karl: Thanks, that sounds like a good reason to me :) I wasn't aware of XHTML not allowing document.write() @Ricardo: The $('head').append() approach looks great. -Hector On Mon, Apr 6, 2009 at 11:31 AM, Karl Swedberg <k...@englishrules.com> wrote: On Apr 5, 2009, at 11:30 PM, Hector Virgen wrote: Just curious, why would you want to avoid document.write()? Here's one reason: http://ln.hixie.ch/?start=1091626816 <http://ln.hixie.ch/?start=1091626816&count=1> &count=1 --Karl ____________ Karl Swedberg www.englishrules.com www.learningjquery.com