Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old September 9th, 2002, 09:35 PM
scrtagt69 scrtagt69 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 scrtagt69 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
slide show in javascript

i got this code from cnet to create a slideshow with javascript, is it possible to modify this code that when it reaches the last slide, instead of starting the show over, it moves on to another page??
The code in action can be viewed here:
http://builder.cnet.com/webbuilding/pages/Authoring/MoreStupid/ss07.html

Thanks for any help.
Code:
<script language="JavaScript1.2">
<!--
// Cross-browser cleanup by Paul Anderson, CNET Builder.com. All rights reserved.
var numSlides = 5;
var currentSlide = numSlides;
// remove the next six lines if you don't want captions:
var captionTxt = new Array(numSlides);
captionTxt[1] = "Entrance to Pier 39"
captionTxt[2] = "Sea lions lounging around the pier"
captionTxt[3] = "Boats docked on the pier"
captionTxt[4] = "Underwater World whale mural"
captionTxt[5] = "Alcatraz, or The Rock"

function setUp() {
if (!document.all) {
   document.all = document;
   for (i=1;i<=numSlides;i++) document.all[("image"+i)].style=document.all[("image"+i)];
   }
switchSlide(1);
}

function switchSlide(sDir) {
newSlide = currentSlide + sDir;
if (!newSlide) newSlide=numSlides;
if (newSlide > numSlides) newSlide=1;
document.all[("image"+newSlide)].style.visibility="visible";
document.all[("image"+currentSlide)].style.visibility="hidden";
// remove the next line if you don't want captions:
document.all["captions"].document.forCaptions.captionsText.value=captionTx  t[newSlide];
currentSlide = newSlide;
}

//-->
</script>

Reply With Quote
  #2  
Old September 17th, 2002, 10:51 AM
greggory greggory is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Reims, France
Posts: 82 greggory User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: slide show in javascript

Just replace
php Code:
Original - php Code
  1.  
  2. if (newSlide > numSlides) newSlide=1;

with
php Code:
Original - php Code
  1.  
  2. if (newSlide > numSlides) {
  3.    location.replace( 'http://IWant2GoHere' );
  4. };


Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > slide show in javascript


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway