»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 10-30-2003, 01:55 PM   #1 (permalink)
Registered User
 
Join Date: Jul 2003
Location: NH
Posts: 180
atomicstomp is on a distinguished road
Send a message via AIM to atomicstomp
Is this code OK?

I cant get it to work?

Code:
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
var img_rnd = new Array 
("AtomicSnowboardInAir.jpg", 
"BaseCamp@Nigth.jpg", 
"BaseCampWsnowbaorders@Nigth.jpg", 
"BaseLodgeWflags.jpg", 
"BCamp@Nigth.jpg", 
"DanInAir.jpg", 
"Dan_In_Glades.jpg", 
"Dan_Heading_To_Glades.jpg", 
"doug_e.psd.jpg", 
"SkierGoingBig(2).jpg",);

var i = Math.round(4*Math.random());

document.write('<IMG SRC="' + img_rnd[i] + '">');
//-->
</SCRIPT>

__________________
((*
*))
((*
*))
atomicstomp is offline   Reply With Quote
Old 10-30-2003, 02:36 PM   #2 (permalink)
Registered User
 
Emc2's Avatar
 
Join Date: Oct 2001
Location: Savannah, GA
Posts: 1,612
Emc2 is on a distinguished road
Send a message via AIM to Emc2
What error is it giving you?

From my basic java experience (I'm more adept in c++), the only error I see is a syntax error...

"SkierGoingBig(2).jpg",);

Should there be a comma before you close the parenthesis? And also, you misspelled Night in "BCamp@Nigth.jpg",

Am I way off base here or does this help?
Emc2 is offline   Reply With Quote
Old 10-30-2003, 04:33 PM   #3 (permalink)
Registered User
 
Join Date: Jul 2003
Location: NH
Posts: 180
atomicstomp is on a distinguished road
Send a message via AIM to atomicstomp
I changed it and it works now thanks.

<script language="JavaScript">
<!--
// Create arrays to contain all the values
// for image locations

image = new Array

image[1]="http://www.tenneymtn.com/images/AtomicSnowboardInAir.jpg"
image[2]="http://www.tenneymtn.com/images/BaseCamp@Nigth.jpg"
image[3]="http://www.tenneymtn.com/images/BaseCampWsnowbaorders@Nigth.jpg"
image[4]="http://www.tenneymtn.com/images/BaseLodgeWflags.jpg"
image[5]="http://www.tenneymtn.com/images/BCamp@Nigth.jpg"
image[6]="http://www.tenneymtn.com/images/DanInAir.jpg"
image[7]="http://www.tenneymtn.com/images/SkierGoingBig(2).jpg"

// Create a random number between 1 and five
random_num = (Math.round((Math.random()*6)+1))


// Write the image tag with a random array element
document.write("<img src=\"" + image[random_num] + "\">");

-->
</script>
__________________
((*
*))
((*
*))
atomicstomp is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 11:02 PM.