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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    js start function doesn't work after reset

    I have a number picker that works fine BUT when I reset the fields to enter another number, the start button will not work.
    I had to make it so the page reloads in order for the start button to work.
    This not only makes the site look worse than it already does but it's annoying to wait for the page to reload.
    I'd like to get all these bugs worked out and work on the site appearance after.
    Am I stuck with this reload thing or does someone know how I can fix it?
    Here's a link....http://www.psychiclotto.org/

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Change this
    Code:
    onclick="window.location.reload()"
    to
    Code:
    onclick="reset_counter()"
    Then add this function to your javascript
    Code:
    function reset_counter()
    {
    clearTimeout(t);
    c=1;
    i=1;
    s=0;
    }
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • Users who have thanked _Aerospace_Eng_ for this post:

    storkfmny (05-21-2012)

  • #3
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks so much, it works wonderfully.
    Man I hated that thing reloading, it is 100% better.
    Thanks again!!!


  •  

    Posting Permissions

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