lancehyde
01-16-2004, 02:47 PM
I am using a script that randomizes the background pictures.
The problem I am having is that the picture doesn't appear fully. Here is my code.
You can visit the page at
http://lancehyde.homeftp.net:8080/test.html
<html>
<head>
<title>Lance Hyde's Web Site!</title>
<SCRIPT LANGUAGE="JavaScript">
today=new Date();
jran=today.getTime();
var number = 10;
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) {
text_color="000000";
image="1.jpg";
}
if (random_number==2) {
text_color="000000";
image="2.jpg";
}
if (random_number==3) {
text_color="000000";
image="3.jpg";
}
if (random_number==4) {
text_color="000000";
image="4.jpg";
}
if (random_number==5) {
text_color="000000";
image="5.jpg";
}
if (random_number==6) {
text_color="000000";
image="6.jpg";
}
if (random_number==7) {
text_color="000000";
image="7.jpg";
}
if (random_number==8) {
text_color="000000";
image="8.jpg";
}
if (random_number==9) {
text_color="000000";
image="9.jpg";
}
if (random_number==10) {
text_color="000000";
image="10.jpg";
}
// End -->
</SCRIPT>
</head>
<body>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
document.open();
document.write("<BODY BACKGROUND='"+image+"' TEXT='"+text_color+"'>");
document.write("<CENTER></CENTER>");
// End -->
</SCRIPT>
</body>
</html>
The problem I am having is that the picture doesn't appear fully. Here is my code.
You can visit the page at
http://lancehyde.homeftp.net:8080/test.html
<html>
<head>
<title>Lance Hyde's Web Site!</title>
<SCRIPT LANGUAGE="JavaScript">
today=new Date();
jran=today.getTime();
var number = 10;
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) {
text_color="000000";
image="1.jpg";
}
if (random_number==2) {
text_color="000000";
image="2.jpg";
}
if (random_number==3) {
text_color="000000";
image="3.jpg";
}
if (random_number==4) {
text_color="000000";
image="4.jpg";
}
if (random_number==5) {
text_color="000000";
image="5.jpg";
}
if (random_number==6) {
text_color="000000";
image="6.jpg";
}
if (random_number==7) {
text_color="000000";
image="7.jpg";
}
if (random_number==8) {
text_color="000000";
image="8.jpg";
}
if (random_number==9) {
text_color="000000";
image="9.jpg";
}
if (random_number==10) {
text_color="000000";
image="10.jpg";
}
// End -->
</SCRIPT>
</head>
<body>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
document.open();
document.write("<BODY BACKGROUND='"+image+"' TEXT='"+text_color+"'>");
document.write("<CENTER></CENTER>");
// End -->
</SCRIPT>
</body>
</html>