Solved

JavaScript Slideshow Break Delay

Posted on 2011-02-17
2
237 Views
Last Modified: 2012-05-11
Hello Experts,

I have a limitted javascript knowledge, but applying what i know and using my VBScript expirience, i've built a javascript slideshow with DIVs at https://www.mylocaladvantage.com/home.asp where if your mouse is not hovered within the recxtengal, the deal changes every 5 seconds.

My question is, when you click on a orange rectange at the bottom in order to skip to a specific deal, it takes a while.  How can I make it jump immidiately?

My assumption is that whn the orange rectangle is clicked, that event is queued, but does not execute until the timer stops and function ends.  If i'm correct, then how can i stop all process?  

Thanks.
0
Comment
Question by:APD_Toronto
2 Comments
 
LVL 8

Accepted Solution

by:
imantas earned 500 total points
ID: 34922329
It looks like that you need to replace your links like this:
<a class="opacityit" href="javascript:secs=0;StopTheClock();InitializeTimer(1);">
  <img id="NO1" src="images/numbered_boxes.jpg" width="65" height="28" style.filter="alpha(opacity=100)" style="">
</a>

Open in new window


to the ones that would look like:
<a class="opacityit" href="javascript:(function() { secs = 0; slideNo = 1; StartTheTimer(); })();">
  <img id="NO1" src="images/numbered_boxes.jpg" width="65" height="28" style.filter="alpha(opacity=100)" style="">
</a>

Open in new window


Please not the "javascript:..." part changed.
Do this for all 10 links that should change the slide and maybe that'll help. It worked in Opera, not sure about the other browsers.
0
 

Author Closing Comment

by:APD_Toronto
ID: 34957402
sorry for tthe delay.  Thank you
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question