NightHawk4900
01-24-2005, 03:27 AM
Okay... so on my xanga... (www.xanga.com/nighthawk4900) i succesfully used some javascript to randomly pick Page titles, splash page images, and status bar messages...
Then i got an idea to somehow use Javascript to randomly pic CSS sheets for my site so that when ppl look at it, it doesnt always look the exact same.... well i can get it to pick a CSS sheet and put it into a variable, but how can i use the variable in the
<link rel="stylesheet" href="link" type="text/css">
tag?
this is the code to randomly pick the sheet:
<script type='text/javascript'>
sheetx=new Array();
sheetx[0] = "http://home.comcast.net/~tphilip60/xanga.css";
sheetx[1] = "http://home.comcast.net/~tphilip60/xangablue.css";
var sheet = Math.floor(Math.random()*sheetx.length);
</script>
So to cap off, i need some way of USING the randomly picked CSS sheet on my site. Thanks in advance for any help...
Then i got an idea to somehow use Javascript to randomly pic CSS sheets for my site so that when ppl look at it, it doesnt always look the exact same.... well i can get it to pick a CSS sheet and put it into a variable, but how can i use the variable in the
<link rel="stylesheet" href="link" type="text/css">
tag?
this is the code to randomly pick the sheet:
<script type='text/javascript'>
sheetx=new Array();
sheetx[0] = "http://home.comcast.net/~tphilip60/xanga.css";
sheetx[1] = "http://home.comcast.net/~tphilip60/xangablue.css";
var sheet = Math.floor(Math.random()*sheetx.length);
</script>
So to cap off, i need some way of USING the randomly picked CSS sheet on my site. Thanks in advance for any help...