Javascript + CSS?

admin

Administrator
Staff member
not sure if this should be in the javascript or css forum...

okay well i've got a javascript random background chooser and i need to set the background using CSS styles.


My CSS code is nothing special:
body {background:ffffff url(JAVASCRIPT HERE) no-repeat fixed right top }

What i need is a way for the url() function in CSS to take use the picture that JavaScript chooses.


ok i simply made a javascript function (printImage) that prints out the name of the selected picture. I can't figure out how to implement it in CSS - url(printImage()) doesnt work... because <script> and <style> tags dont seem to work nested inside each other.

any workarounds/ideas? help.... thanks
 
Back
Top