Re: Loading CSS for AJAX apps.

Alex Duffield
Thu, 15 Jun 2006 23:00:47 -0000

Ya, this seems to work in Safari, but a similar function for loading
the JS fails in Safari.




______________________________________________________________________
Alex Duffield . Principal . InControl Solutions . http://
www.incontrolsolutions.com



On 15-Jun-06, at 2:45 PM, Sam wrote:

> function LoadCSS(file){
> var head = document.getElementsByTagName(''head'').item(0)
> var linkTag = $(''loadCSS'');
> if(linkTag) head.removeChild(linkTag);
> csslink = document.createElement(''link'');
> csslink.href = file;
> csslink.rel = ''stylesheet'';
> csslink.type = ''text/css'';
> csslink.id = ''loadCSS'';
> head.appendChild(csslink)
> }
>
> Nice.  I''d like to hear of any cross-browser support issues, or
> lack of.  I can see this being useful in my application if it
> works.  Has anyone tried this in Safari?
>
> Sam