PDA

View Full Version : Background Changing HELP!



Wo33er
07-04-2003, 05:57 PM
Right this is the 2nd Forum i have joined just to get this problem out of the way. What i am hoping for is on my main site 3 image files that upon click change the background of the whole site.

I do not want the background to be the same as the selected image file (which is done on this link Here (http://www.dynamicdrive.com/dynamicindex3/document1.htm).

I want the selected image files to be called eg1-3.jpg and the actual background files to be called bg1-3.jpg.

-=-=-=-=-=

Also while i am at it, i want the above situation but with Font Colours. I have used alternate style sheets to try and get this to work but since all my site infomation is in a i-frame on the actual main page only the main page font changes and not the actual in i-frame font.... Please can someone solve these annoying problems for me.

Thanking you in advance - Reece Warrender

FJbrian
07-05-2003, 06:24 AM
Originally posted by Wo33er
I do not want the background to be the same as the selected image file (which is done on this link Here (http://www.dynamicdrive.com/dynamicindex3/document1.htm).

I want the selected image files to be called eg1-3.jpg and the actual background files to be called bg1-3.jpg.



I'm not sure I follow that last sentence but I'll take a guess you want two arrays.

array1 will have eg1-3.jpg
array2 will have bg1-3.jpg

The count(length) selected in the array(2nd, 3rd 4th) will MATCH and wind up being the background image used in the second array

Wo33er
07-05-2003, 04:07 PM
You sound like u know whats what, can u explain in as much details as u can please because i am not a regular java user and only a amatuer web developer.

FJbrian
07-06-2003, 05:55 AM
two arrays, but you're using them like 1 and 1a matching as I mentioned before

array1=(scooby, yogi)
array2=(doo,bear)

x=array.length(length of array, two entries but with arrays 0 is first entry)
x=x+1(since 0 is first entry put a counter(x=x+1) AFTER ya find the length
what=array[x] (value or context of item in array1)
whatever=array2[x](value of item in array2)


make a phrase with "what" and "whatever" and you get scoobydoo and yogibear

yep I stink at explaining....
If you're a rookie, spend alot of time at HTMLGoodies.com. Joe Burns is a professor that really has a wonderful way of explaining things. It's a well respected site.
Javascript primer 26 and 27 are probably what you want
http://www.htmlgoodies.com/primers/jsp/hgjsp_26.html

this one too maybe
http://htmlgoodies.earthweb.com/stips/scripttip34.html

FJbrian
07-06-2003, 06:05 AM
Here's another link
http://www.htmlgoodies.com/js-ref/part4.html
and this guy Thau from Webmonkey is good too
http://hotwired.lycos.com/webmonkey/98/04/index1a_page8.html

Plus do you play fantasy football? Or know what a mock draft is like for sports?
I did this
http://www.footballjoint.com/Teams/mock.htm
last year with the help/tips from folks here, get alot of compliments on the page and script. It's using an array and such.

Maybe it'll help to have a working model, if ya know sports maybe it's yet another example you'll understand


Array's are real useful and common, great thing to learn