Hi guys!
First off some people might enjoy this script: It will allow your page to change the wallpaper each and every time you refresh! It will be for my portfolio page where I have graphic design pieces. Anyway, I have my wallpaper, but I do not know what code I have to type in so that the wallpaper is static, and the website text/content scrolls over without the image scrolling.
here is the code:
<SCRIPT LANGUAGE="JavaScript">
<!--
today=new Date();
jran=today.getTime();
var number = 11;
var random_number="";
var image="";
var text_color="";
ia=9301;
ic=49297;
im=233280;
jran = (jran*ia+ic) % im;
random_number = Math.ceil( (jran/(im*1.0)) *number);
// Loads the appropriate image and text color based on random number.
if (random_number==1) {
image="images/pic1.jpg";
}
if (random_number==2) {
image="images/pic2.jpg";
}
if (random_number==3) {
image="images/pic3.jpg";
}
if (random_number==4) {
image="images/pic4.jpg";
}
if (random_number==5) {
image="images/pic5.jpg";
}
if (random_number==6) {
image="images/pic6.jpg";
}
if (random_number==7) {
image="images/pic2.jpg";
}
if (random_number==8) {
image="images/pic3.jpg";
}
if (random_number==9) {
image="images/pic4.jpg";
}
if (random_number==10) {
image="images/pic5.jpg";
}
if (random_number==11) {
image="images/pic6.jpg";
}
// End -->
</SCRIPT>
<div id=EchoTopic>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
document.open();
document.write("<BODY BACKGROUND='"+image+"'>");
document.write("<CENTER></CENTER>");
// End -->
</SCRIPT>
if anyone could help me I would appreciate it!
I already have the wallpaper static in my css but that does not seem to do anything since I am trying to change the wallpaper after every refresh.
thank you again!
First off some people might enjoy this script: It will allow your page to change the wallpaper each and every time you refresh! It will be for my portfolio page where I have graphic design pieces. Anyway, I have my wallpaper, but I do not know what code I have to type in so that the wallpaper is static, and the website text/content scrolls over without the image scrolling.
here is the code:
<SCRIPT LANGUAGE="JavaScript">
<!--
today=new Date();
jran=today.getTime();
var number = 11;
var random_number="";
var image="";
var text_color="";
ia=9301;
ic=49297;
im=233280;
jran = (jran*ia+ic) % im;
random_number = Math.ceil( (jran/(im*1.0)) *number);
// Loads the appropriate image and text color based on random number.
if (random_number==1) {
image="images/pic1.jpg";
}
if (random_number==2) {
image="images/pic2.jpg";
}
if (random_number==3) {
image="images/pic3.jpg";
}
if (random_number==4) {
image="images/pic4.jpg";
}
if (random_number==5) {
image="images/pic5.jpg";
}
if (random_number==6) {
image="images/pic6.jpg";
}
if (random_number==7) {
image="images/pic2.jpg";
}
if (random_number==8) {
image="images/pic3.jpg";
}
if (random_number==9) {
image="images/pic4.jpg";
}
if (random_number==10) {
image="images/pic5.jpg";
}
if (random_number==11) {
image="images/pic6.jpg";
}
// End -->
</SCRIPT>
<div id=EchoTopic>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
document.open();
document.write("<BODY BACKGROUND='"+image+"'>");
document.write("<CENTER></CENTER>");
// End -->
</SCRIPT>
if anyone could help me I would appreciate it!
I already have the wallpaper static in my css but that does not seem to do anything since I am trying to change the wallpaper after every refresh.
thank you again!