is it possible?
Why in gods name would i want to?
I am working within the confines of a clients annoying CMS designed by someone else who is unresponsive to my requests. So i have access to the CSS but have yet to find access to the entire header template so that I can link to js. So in thinking about workarounds is there a way to have a notation in a stylesheet to load a js file? I know you can load css with JS but what about vice versa?
Why in gods name would i want to?
I am working within the confines of a clients annoying CMS designed by someone else who is unresponsive to my requests. So i have access to the CSS but have yet to find access to the entire header template so that I can link to js. So in thinking about workarounds is there a way to have a notation in a stylesheet to load a js file? I know you can load css with JS but what about vice versa?
-
Re: loading javasctipy from css
Wed, April 2, 2008 - 5:39 PMWhat CMS is it? I would look to find a module that allowed me to add stylesheets tot he head or to creating that module myself. If its got decent architecture to it you should be able to intercept the response and add things to it before its rendered. assuming you have access to source to look at or that it is one with decent documentation (Drupal, Joomla, ModX, etc..).
However more directly... no. However you could jsut put the script tag in the page. Kinda ugly but itd work... assumign the CMS doesnt escape it hehe.
-
Re: loading javasctipy from css
Fri, April 11, 2008 - 8:45 AMIf the template webpage is written in PHP or a similar language, there's no strong reason to alter the template to add the calls you need, rather than doing that in the CSS itself. -
-
Re: loading javasctipy from css
Fri, April 11, 2008 - 8:52 AMmake that "...no strong reason NOT to..."
-
Re: loading javasctipy from css
Mon, April 14, 2008 - 10:02 PMwell, the CMS is some kind of home brew of which i have no access...
so...
i (in my opinion) copped out and used an iframe. everything is neat and tidy in it's little box. that is certainly never my favorite way to do things but they have their place....
-