javascript - Disable Button After Click for 60 Seconds Even If Browser Refreshes Using Meteor -
i have been searching, tons of trial , error, yet find solution issue. have found solutions nothing have been successful @ implementing.
i using meteor , want create input/button disabled 60 seconds once clicked. can make part happen biggest issue refreshing browser makes button clickable again.
is there way tie timer user id? appreciated. reading date.now(); , sugar js, not able make them work application.
you can use html localstorage. eg:
while clicked button set this. localstorage.setitem('status', 1); while 60 sec complete apply localstorage.setitem('status', 0);
and check everytime when button click weather localstorage 0 or 1.
if 0 submit else return false. , localstorage value use localstorage.getitem('status');
Comments
Post a Comment