Previous Thread
Next Thread
Print Thread
Rate Thread
#278421 08/23/2004 11:25 AM
Joined: Jun 2003
Posts: 88
Power User
Power User
Offline
Joined: Jun 2003
Posts: 88
I have threads integrated into my entire website. I am trying to runa script on oen of the pages. The script runs great but when trying to change to the next picture it changes the first image on the page...which is in the header nav menu. So the image inside the pic viewer doesnt change. Anyone know a way to make it so it will change the pic in the viewer instead of the image in the nav menu?
Heres the script.....



<script>

var iImage = 1;

var LAST_IMAGE = 17;

var NarrateStrings = new Array(LAST_IMAGE);



// Start loading the pictures...



NarrateStrings[0] = "Tucker takes the turn overlooking the landscape below";
NarrateStrings[1] = "The Three Amigos";
NarrateStrings[2] = "Cruiser navigates the technical terrain";
NarrateStrings[3] = "Moab hoists the bike and shows off his wooden leg";
NarrateStrings[4] = "Priceless";
NarrateStrings[5] = "The most scenic shot ever taken of a guy peeing. Thanks Tucker!";
NarrateStrings[6] = "Moab drops the rock";
NarrateStrings[7] = "The money shot. Instant wallpaper.";
NarrateStrings[8] = "Cruiser navigates the switchback";
NarrateStrings[9] = "Cruiser and Tucker going opposite ways";
NarrateStrings[10] = "Tucker rolls the log";
NarrateStrings[11] = "";
NarrateStrings[12] = "Extreme Closeup";
NarrateStrings[13] = "Tucker navigates the sweet singletrack";
NarrateStrings[14] = "Moab lounging on top of the world";
NarrateStrings[15] = "Moab navigates the crossing";
NarrateStrings[16] = "Cruiser and Tucker starring in The Sound of Music";
NarrateStrings[17] = "";
NarrateStrings[18] = "";
NarrateStrings[19] = "";
NarrateStrings[20] = "";
NarrateStrings[21] = "";
NarrateStrings[22] = "";
NarrateStrings[23] = "";
NarrateStrings[24] = "";
NarrateStrings[25] = "";
NarrateStrings[26] = "";
NarrateStrings[27] = "";
NarrateStrings[28] = "";
NarrateStrings[29] = "";
NarrateStrings[30] = "";
NarrateStrings[31] = "";
NarrateStrings[32] = "";
NarrateStrings[33] = "";
NarrateStrings[34] = "";
NarrateStrings[35] = "";
NarrateStrings[36] = "";
NarrateStrings[37] = "";
NarrateStrings[38] = "";
NarrateStrings[39] = "";
NarrateStrings[40] = "";
NarrateStrings[41] = "";
NarrateStrings[42] = "";
NarrateStrings[43] = "";
NarrateStrings[44] = "";
NarrateStrings[45] = "";
NarrateStrings[46] = "";
NarrateStrings[47] = "";
NarrateStrings[48] = "";
NarrateStrings[49] = "";
NarrateStrings[50] = "";
NarrateStrings[51] = "";
NarrateStrings[52] = "";
NarrateStrings[53] = "";
NarrateStrings[54] = "";
NarrateStrings[55] = "";
NarrateStrings[56] = "";
NarrateStrings[57] = "";
NarrateStrings[58] = "";
NarrateStrings[59] = "";



function NextImage()

{

iImage += 1;

if ( iImage > LAST_IMAGE ) iImage = 1;

SwitchImage();

}



function PreviousImage()

{

iImage -= 1;

if ( iImage < 1 ) iImage = LAST_IMAGE;

SwitchImage();

}



function SwitchImage()

{

document.images[0].src = GetImageName(iImage);

WriteImageCount();

WriteNarrative();

}



function GetImageName(imageNum)

{

return "../images/Utah/deervalley/utah2004"+ imageNum + ".jpg";

}



function WriteImageCount()

{

countString = iImage + " of " + LAST_IMAGE;



if ( document.all )

{

// MS IE4 or better

CountText.innerText = countString;

}

else if ( document.layers )

{

// Netscape crud

fontStart = "<p align='center'><big><color='#000000'>";

fontEnd = "</big></p>";

document.layers["PositionLayer"].clip.width = document.width;

document.layers["PositionLayer"].clip.height = 20;

document.layers["PositionLayer"].left = -document.width/2 + 15;

document.layers["PositionLayer"].document.layers["CountLayer"].document.open();

document.layers["PositionLayer"].document.layers["CountLayer"].document.write(fontStart + countString + fontEnd);

document.layers["PositionLayer"].document.layers["CountLayer"].document.close();

}

}



function WriteNarrative()

{

narrateString = NarrateStrings[iImage - 1];



if ( document.all )

{

// MS IE4 or better

NarrateText.innerText = narrateString;

}

else if ( document.layers )

{

// Netscape crud

fontStart = "<p align='center'><b><font face='Arial' size='1' color='#000080'>";

fontEnd = "</b></p>";

document.layers["NarrativeLayer"].clip.width = document.width;

document.layers["NarrativeLayer"].clip.height = 20;

document.layers["NarrativeLayer"].left = -document.width/2 + 15;

document.layers["NarrativeLayer"].document.layers["NarrateLayer"].document.open();

document.layers["NarrativeLayer"].document.layers["NarrateLayer"].document.write(fontStart + narrateString + fontEnd);

document.layers["NarrativeLayer"].document.layers["NarrateLayer"].document.close();

}

}

</script>
<p align="center"><strong>Utah Pics</strong><br>
<big>Deer Valley</big></p>
<hr>

<div align="center">
<center>
<table border="0">
<tr>
<td align="center" valign="top">
<img border="1" src="../images/Utah/deervalley/utah20041.jpg">
</td>
</tr>
<tr>

<td align="center" valign="top">
<form method="POST">
<p>
<input type="button" value="<< Prev" name="Prev" onClick="PreviousImage();" style="color: #000000; font-family: Arial; font-size: 8pt; font-style: italic; font-weight: bold">
<input type="button" value="Next >>" name="Next" onClick="NextImage();" style="font-family: Arial; color: #000000; font-size: 8pt; font-style: italic; font-weight: bold">
</p>
</form>
</td>
</tr>

<tr>
<td align="center" valign="top"><b>

<p id="CountText"></p>
<p id="NarrateText"></b></td>
</tr>
<tr>
<td align="center" valign="top"><b>
<ilayer id="PositionLayer" left="-450">


<layer id="CountLayer">
</layer>
</ilayer>
</b></td>
</tr>
<tr>
<td align="center" valign="top"><b>
<ilayer id="NarrativeLayer" left="-450">


<layer id="NarrateLayer">
</layer>
</ilayer>
</b></td>
</tr>
</table>
<div align="left">
<p><br>
<br>
<big>Sunday, July 18</big> <br>
Slept horrible. Maybe 5 hours at the most. Assembled the bike with only one issue. The hydraulic brake lines had pressurized leaving my front brakes so tight I could barely wedge my front tire in between them. Not good. I knew that a full days worth of Downhill riding would wear the pads a little and the problem should be taken care of. Loaded up the pickup and went over to Cruisers and Tuckers hotel. Tucker got some deal where they gave him 2 rooms instead of one for the same price accidentally. We hit the local Denny’s and started the 35 minute drive towards Deer Valley resort. I am struck by how pretty Salt Lake City is. It is completely surrounded by mountains. No Mormon encounters yet. At least not that I know of. :-)</p>
<p> We arrive at Deer Valley thanks to the GPS(its so nice not traveling with any paper maps) and load up. I use one shin pad to cover my 2 huge bumps on my shin from 2 weeks ago. I never knew Rae could kick like that! One more hit and I’m done for the week. I look like I’m making some Michael Jackson Fashion statement.
We buy out lift tickets and take the lift up. It takes about 15 minutes to get up. We hit Aspen slalom trail and it is incredible. Technical with drops and tight switchbacks all the way down. Much better than Sun Valleys longer but non-technical DH runs. Unlike Sun Valley this place has multiple routes marked like ski trails that you can come down. Marked in degrees of difficulty(easy-expert) so you can weave your way down. We continue to hit run after run and save a 6 mile trail for last. This is some of the most awesome singletrack I have ever ridden. The views are amazing. It did involve some pedaling unlike the other runs but it was worth every stroke. The weather was perfect today. My luck must be changing. We pack up and head into Park City and grab some BBQ(again thanks to the GPS). Cool town but touristy as you’d expect any ski resort town to be. Headed back to SLC. Looked at pics taken during the day and there are some real good ones. Back at my trusty Motel 6 I am awakened by the stomping above me. I have the people from hell right above me. It is so bad I call and ask to be moved to another room upstairs. It’s a big hassle with bike, bike case, and 3 bags but I need to sleep! </p>
<p align="center"><a href="utah2.php"><img src="../images/arrowright.GIF" alt="next page" width="25" height="15" border="0"></a><br>
<br>
<a href="utahintro.php">Utah Pics Main Page </a>

</p>
</div>
</center>
</div>

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
• Shock Hosting
• Stable Host
• bluehost
• InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,156
Joined: July 2001
Forum Statistics
Forums63
Topics37,583
Posts293,957
Members13,826
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 4639
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 24
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
isaac 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20261026)