inherit
151747
0
Nov 22, 2014 11:15:08 GMT -8
Mockingbird
True Role-Players
398
February 2010
emilcastagnier
|
Post by Mockingbird on Jul 10, 2010 13:46:22 GMT -8
|
|
inherit
The Final Cylon
31521
0
Mar 3, 2015 14:39:33 GMT -8
Trublu
Maybe the duck is in the hat.
12,323
October 2004
trublusvufan
|
Post by Trublu on Jul 10, 2010 14:01:55 GMT -8
At the end of this code: // Cursor over board.. Add this: </script> Also, you'll need to have the random background code installed for us to see what the issue is.
|
|
inherit
151747
0
Nov 22, 2014 11:15:08 GMT -8
Mockingbird
True Role-Players
398
February 2010
emilcastagnier
|
Post by Mockingbird on Jul 10, 2010 15:02:54 GMT -8
It's in the global header, and it still fails to work. :c
|
|
inherit
The Final Cylon
31521
0
Mar 3, 2015 14:39:33 GMT -8
Trublu
Maybe the duck is in the hat.
12,323
October 2004
trublusvufan
|
Post by Trublu on Jul 10, 2010 16:10:42 GMT -8
It's in the global header, and it still fails to work. :c Note this: // No comma on last line So, remove the comma you have in.
|
|
inherit
151747
0
Nov 22, 2014 11:15:08 GMT -8
Mockingbird
True Role-Players
398
February 2010
emilcastagnier
|
Post by Mockingbird on Jul 10, 2010 16:26:05 GMT -8
Still doesnt work DX
|
|
inherit
134992
0
May 26, 2012 2:38:57 GMT -8
SubDevo
Creator of LSD...
3,861
December 2008
subdevo
|
Post by SubDevo on Jul 10, 2010 16:55:58 GMT -8
You took out too many commas... Add the Blue comma.
var backgrounds = new Array( "http://i975./ae231/emilcaster/richterback-1.png", "URL to Image" // No comma on last line );
If you add more lines, there MUST be a comma after each line EXCEPT for the last one.
Example:
var backgrounds = new Array( "BACKGROUND 1", "BACKGROUND 2", "BACKGROUND 3", "BACKGROUND 4" // No comma on last line );
Regards, SubDevo
|
|
inherit
151747
0
Nov 22, 2014 11:15:08 GMT -8
Mockingbird
True Role-Players
398
February 2010
emilcastagnier
|
Post by Mockingbird on Jul 10, 2010 17:14:03 GMT -8
It still doesnt work :__:
Maybe I'm missing a typo...
|
|
inherit
134992
0
May 26, 2012 2:38:57 GMT -8
SubDevo
Creator of LSD...
3,861
December 2008
subdevo
|
Post by SubDevo on Jul 10, 2010 17:19:58 GMT -8
Well, it is random. So, since you have three URLS that are nothing, you have a 25% chance that you will see nothing. Add more image URLS. or just have one in the list for now just for testing.
var backgrounds = new Array( "http://i975./ae231/emilcaster/richterback-1.png" );
|
|
inherit
151747
0
Nov 22, 2014 11:15:08 GMT -8
Mockingbird
True Role-Players
398
February 2010
emilcastagnier
|
Post by Mockingbird on Jul 10, 2010 17:38:56 GMT -8
still no luck..
|
|
inherit
134992
0
May 26, 2012 2:38:57 GMT -8
SubDevo
Creator of LSD...
3,861
December 2008
subdevo
|
Post by SubDevo on Jul 10, 2010 17:47:26 GMT -8
Hmm, yup. I checked in a test site. The code does in fact, have an error. You need to change the " 0" to a " 1" in this line: var style = document.styleSheets.item( 0); That should do it. Just for testing, try this: var backgrounds = new Array( "http://i975./ae231/emilcaster/richterback-1.png", "FF00FF" ); Try refreshing your page a few times and see if you get a random solid color or the image. If it works, you can remove that "color" line and add more images. Make sure you remember the "comma thing". lol Regards, SubDevo
|
|
inherit
151747
0
Nov 22, 2014 11:15:08 GMT -8
Mockingbird
True Role-Players
398
February 2010
emilcastagnier
|
Post by Mockingbird on Jul 10, 2010 17:54:21 GMT -8
It still doesnt work. XD
|
|
inherit
134992
0
May 26, 2012 2:38:57 GMT -8
SubDevo
Creator of LSD...
3,861
December 2008
subdevo
|
Post by SubDevo on Jul 10, 2010 18:01:08 GMT -8
WOW. Making that change works in IE, but not in FF. Lets just nip this in the bud.
Replace your code with this.
<script type="text/javascript"> /* Random Background Image or Color by SubDevo */
var backgrounds=[ "http://i975./ae231/emilcaster/richterback-1.png", "FF00FF" ];
var bg=backgrounds[Math.floor(backgrounds.length*Math.random())]; bg=(bg.indexOf("http:")==0)?"-image:url("+bg+")":"-color:#"+bg; document.write("<style type='text/css'>body{background"+bg+";}</sty"+"le>"); </script>
|
|
inherit
151747
0
Nov 22, 2014 11:15:08 GMT -8
Mockingbird
True Role-Players
398
February 2010
emilcastagnier
|
Post by Mockingbird on Jul 10, 2010 18:02:22 GMT -8
Yay, it works! Thanks so much! ^^
|
|
inherit
134992
0
May 26, 2012 2:38:57 GMT -8
SubDevo
Creator of LSD...
3,861
December 2008
subdevo
|
Post by SubDevo on Jul 10, 2010 18:06:52 GMT -8
Cool! Now, get some other images in there quick! That hot pink is killing me! LMAO SubDevo
|
|
inherit
151747
0
Nov 22, 2014 11:15:08 GMT -8
Mockingbird
True Role-Players
398
February 2010
emilcastagnier
|
Post by Mockingbird on Jul 10, 2010 18:08:52 GMT -8
Right. XD
|
|