Creating CountDown Timer

Hi Guys,

If anyone would like to create a countdown timer then see attached script :slight_smile:

I am basically using this countdown timer for RugbyWC 2015 which is starting in September. All you have to do is to update “DayToVar” string to your preferred date and the countdown will begin.

You can also click here to view the sample.

Cheers
Aadil
CountDownTimer.rp (63 KB)

1 Like

Impressive stuff!

Would be good for an admin to move this to Tips, Tricks, and Examples so it doesn’t get buried here.

1 Like

My only teeny tiny niggle is that the hours, minutes and seconds drop to a single digit. I would prefer to see 05; 04; 03 etc.

Brilliant Stuff!! I am trying to update DayToVar string but the result shows NAN in prototype

can you please guide me on this…uploaded pics…thanks in advance!!!



Can you show the full value string you are trying to set the DayVar to?

Thanks for your quick response !! Had attached he rp file for your perusal…basically i am trying to replicate a countdown timer to a football match!!
CountDownTimer_v1.rp (62.9 KB)

In your OnPanelStateChange, you need to change where you set the value of ‘DayVar’.

Where you have Date.parse(12) change the ‘12’ to ‘DayToVar’, so it reads Date.parse(DayToVar)

Then, change the OnPageLoad to set the value of DayToVar. So, for example, if you wanted to count down to Christmas, you would set that variable to be ‘SUN DEC 25 2016’.

1 Like

Thanks for the response… but i tried as you quoted but still the same result…I had attached my RP again…
CountDownTimer_v2.rp (62.8 KB)

sorry to bother guys!!! can you please help me on this. I had updated DayToVar variable on pageload still it displays NaN

Not sure what the issue is - your v2 file is working fine for me. Have you tried clearing your browser cache?

Hi All,

Please see attached updated countdown timer code :slight_smile: With nicer look and fixes.

If it was useful then please let me know :slight_smile:

Regards,
Aadil
CountDownTimer v.2.rp (79.1 KB)

Hi guys

i tried clearing browser cache and multiple browsers as well still the same issue

Are you still seeing this behavior? Like James, I’m not seeing this when working with the CountDownTimer_v2 file you posted on 7/2–it works fine for me on both Windows and Mac across multiple browsers.

If you’re still getting the NaN error, try downloading the file from your post and see if that freshly downloaded copy works for you. If it doesn’t, try updating Axure RP via the “Help > Check for Updates” dialog and see if that helps.

Thanks for this, Aadil. But I have an issue of getting it to work when I import it into another project. It shows up like this.

Any tips please and thanks? :slight_smile:

Did you import the variables?

1 Like

Hello Friend,

You will need to ensure that you have copied across all the variables and formulas applied to those variables.

Only then you will able to get the count down timer to work.

Cheers,
Aadil

1 Like

Sorry for delay. I was away from web design for a while. I can’t remember exactly what I did now but I’ll post if I get back to it again.

Here an updated RP file: CountDownTimer-updated.rp (251.7 KB)