Countdown Time Display
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Countdown Time Display
I trying to add a display to show the time to a redirect ie "Redirect in x seconds" where x changes from 10 to 9 to 8 etc. I can set up the re-direct OK but not the display.
I've looked at the Java script options and the Timer facility but this does not seem to offer what I want.
Seems such a simple request, but how do I achieve it?
I've looked at the Java script options and the Timer facility but this does not seem to offer what I want.
Seems such a simple request, but how do I achieve it?
- BaconFries
-
- Posts: 5234
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Countdown Time Display
There is a Page Redirect extension see Page Redirect if you require a script that displays a countdown on the page with a redirect then you will need to implement your own/external script for this using the following:
Add HTML
Example of script (external)
Redirect/Countdown
User made Extension
Redirect
Add HTML
Example of script (external)
Redirect/Countdown
User made Extension
Redirect
Re: Countdown Time Display
Many thanks for the prompt reply and coding that does exactly what I want.
I have just one problem, and this is due to my very limited technical knowledge of HTML & scripting, so I apologise in advance.
My problem is I added a text box where I wanted the message to be dispalyed and add the code suitably modified with the destination url.
This runs ok and redirects and displays the countdown message but the meassage displays in the top LH corner of the screen not where I put the text.
My inexperience does not let me woek out what I need to do to display the message where I want it. Can you point me in the right direction please.
I have just one problem, and this is due to my very limited technical knowledge of HTML & scripting, so I apologise in advance.
My problem is I added a text box where I wanted the message to be dispalyed and add the code suitably modified with the destination url.
This runs ok and redirects and displays the countdown message but the meassage displays in the top LH corner of the screen not where I put the text.
My inexperience does not let me woek out what I need to do to display the message where I want it. Can you point me in the right direction please.

Re: Countdown Time Display
Did you set the HTML object to 'use div'?
Re: Countdown Time Display
Sorry I did not, (More ignorance on my part)
Reading the original HTML insertion instructions there ere three option:
Insert Custom HTML
Insert Page HTML
Insert Object HTML
I chose the third because I thougt the code wold work where the object was (Obviously not the case)
I also tried it Inside & After Tag - still no joy
I can now see that in the Object Properties > General > Advanced there is mention of Use <div> but the ptions make no sense to me. Is this what I should be setting?
I can only apologise for trying something outside my knowledge zone but that the way we learn.

Any more specific instructions about use div as setting this so it display wher I want much appreciated.
Re: Countdown Time Display
1. Insert an HTML object from the toolbox
2. Double click the object
3. Paste the code.
Note that the object is set to 'use div' by default.
If the code does not work, then either the code is wrong, in complete or there is a conflict with other code on the page.
Unfortunately I cannot help you with the implementation of external code, because for me it may also take hours to figure out how to make it work.
2. Double click the object
3. Paste the code.
Note that the object is set to 'use div' by default.
If the code does not work, then either the code is wrong, in complete or there is a conflict with other code on the page.
Unfortunately I cannot help you with the implementation of external code, because for me it may also take hours to figure out how to make it work.
Re: Countdown Time Display
Have got the redirect indication dispalying top centre above the page which is an acceptable compromise until I sort it out.
Understand about ongoing support, thanks for the help.
PS Perhaps we'll see this functionality in a later realse as standard
Understand about ongoing support, thanks for the help.
PS Perhaps we'll see this functionality in a later realse as standard

- iamafireman
-
- Posts: 91
- Joined: Mon May 26, 2008 2:41 am
- Location: Tennessee
Re: Countdown Time Display
If you are still looking, heres a code I just used. Its just a simple count down. I used the redirect in "page properties", used text object to write what ever words you want to say, and then insert the HTML object, with the code, under the text. I have a 5sec count down so just change all the "5s" to what ever you want.
https://www.codingforums.com/javascript ... timer.html
https://www.codingforums.com/javascript ... timer.html
Code: Select all
<script type = "text/javascript">
/*author Philip M. 2010*/
var timeInSecs;
var ticker;
function startTimer(secs){
timeInSecs = parseInt(secs)-1;
ticker = setInterval("tick()",1000); // every second
}
function tick() {
var secs = timeInSecs;
if (secs>0) {
timeInSecs--;
}
else {
clearInterval(ticker); // stop counting at zero
// startTimer(5); // remove forward slashes in front of startTimer to repeat if required
}
document.getElementById("countdown").innerHTML = secs;
}
startTimer(5); // 5 seconds
</script>
<span id="countdown" style="font-weight: bold;">5</span>