...

View Full Version : js start function doesn't work after reset



storkfmny
05-20-2012, 11:42 PM
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/

_Aerospace_Eng_
05-21-2012, 12:02 AM
Change this

onclick="window.location.reload()"
to

onclick="reset_counter()"
Then add this function to your javascript

function reset_counter()
{
clearTimeout(t);
c=1;
i=1;
s=0;
}

storkfmny
05-21-2012, 11:03 AM
Thanks so much, it works wonderfully.
Man I hated that thing reloading, it is 100% better.
Thanks again!!!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum