View Full Version : Load javascript .js file via CSS?

12-31-2005, 01:36 PM
Is it possible to add a javascript file via CSS which is applying on body tag?:)

12-31-2005, 01:59 PM
Erm. Not unless you use CSS exploits (http://www.quirksmode.org/css/javascript.html).

Perhaps you'd be best in telling us what you actually want to do. ;)

01-05-2006, 12:01 AM
Hhaha... well... I'm programing a chat which uses browser plug-in to view the chat, and there are several html files which contain only JavaScript functions like addtext() and addstylesheet() to call them from the program in order to view clients text and to chage themes of the chat. I don't want to edit the files, I just want to use the function addstylesheet() to add my stylesheet. The current problem is because I wanted to create winter theme with winter.css and had the Idea to add snowflakes. I have a snowstorm .js file and I just need to find a way to link it with the css...:)

01-08-2006, 02:04 PM
Any ideas...?:(