Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Mr.
    Mr. is offline
    Regular Coder
    Join Date
    Feb 2011
    Posts
    112
    Thanks
    8
    Thanked 4 Times in 4 Posts

    Unhappy Timer plugin won't work after executed once

    I am using This Timer Plugin to create a timer once a button is clicked. You can see it in action here If you notice, when you click any of the purchase buttons twice, it is ignored and will not be executed again. I cannot figure out how to correct this. I need to the timer to restart anytime I click the button once the timer is finished.

    Here is the the HTML I am using on the first button:

    Code:
        <h3 class="protection"><span id="sentryTime">00:00:00</span><a href="javascript:sentry()">Purchase Sentry</a></h3>
    And here is the javascript I am using on that button which calls the plugin to create the timer:

    Code:
    function sentry() {
        	var dateCreated1 = new Date();
        setCharacterTime(/*hr*/0,/*min*/0,/*sec*/5,/*title*/'sentryTime',dateCreated1)} 
        
        
        function setCharacterTime(hours, minutes, seconds, title, creationDate) {
        
        	var thisDay = creationDate;
        	var year = thisDay.getFullYear();
        	var month = thisDay.getMonth();
        	var day = thisDay.getDate();
        	var aHour = thisDay.getHours();
        	var aMinutes = thisDay.getMinutes();
        	var aSeconds = thisDay.getSeconds();
        	var aMilli = thisDay.getMilliseconds();
        	thisDay = new Date(year, month, day, aHour + hours, aMinutes + minutes, aSeconds + seconds, aMilli);
        	$('#' + title).countdown({until: thisDay, format: 'HMS', layout: ' {hnn}{sep}{mnn}{sep}{snn}', expiryText: 'complete '});
        	;} //end setCharacterTime() function
    If you need to see the jQuery plugin, you can find it live here.

  • #2
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    Check the error console for messages.
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

  • #3
    Mr.
    Mr. is offline
    Regular Coder
    Join Date
    Feb 2011
    Posts
    112
    Thanks
    8
    Thanked 4 Times in 4 Posts
    How do I do that?

  • #4
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    If you are using IE, look in the lower-left corner of the browser for a yellow triangle with an exclamation point (!) in it. Double click it to see the error message. If it's not there, then there is no error message.

    If you are using FireFox, click on the menu and look for "Web Developer" and under that "Web Console".
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

  • #5
    Mr.
    Mr. is offline
    Regular Coder
    Join Date
    Feb 2011
    Posts
    112
    Thanks
    8
    Thanked 4 Times in 4 Posts
    There are no errors.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •