Solved

JavaScript Slideshow Break Delay

Posted on 2011-02-17
2
238 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

860 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