Web Hosting - Debt Consolidation - Lingerie - Lockers - Name tag

PDA

View Full Version : Need help with minor javascript problem


Eminem
Oct 21st 2008, 1:44 pm
Hey all iv got this iframe on my javascript code, i wont paste it all since its an affiliate code, the colour part of the code is as follows:

bg=%23ffffff

However I don't want the colour of the background to be white, i want to include a background image! So can someone please tell me what code to insert to get this to happen.

Thanks

BrandonGregory
Oct 21st 2008, 3:05 pm
I would use JS to set the CSS styles. Here's the gist of it:

object.style.backgroundImage = "images/whatever.jpg";

I'm not 100% sure that will work, but I think it will. Google "JavaScript style object" to figure out how to set any CSS style using JS.

rhoula
Oct 21st 2008, 7:16 pm
Please send the script and I will do my best to help you.
Thank you

xlcho
Oct 21st 2008, 11:23 pm
If you use CSS you should add the image as fallows:
background: url('path_to_image/image_name.extension'); you can also add repeation of the background, positioning, etc..

If you need to use JS, you can use BrandonGregory's code