Page 1 of 2

When sending phone verification code, plus some JS code judgments can not be repeated within 60 seconds to send the veri

Posted: Fri Dec 27, 2013 3:04 am
by Crystal

But something is wrong,there was nothing happend.
I have added a JavaScript like this :

var wait = 60;
function time(o) {
if (wait == 0) {
o.removeAttribute("disabled");
o.value = "Get Code";
wait = 60;
} else {
o.setAttribute("disabled", true);
o.value = "Resend(" + wait + ")";
wait--;
setTimeout(function() {
time(o)
},
1000)
}
}

When in the Send Code Click button ,run javascript like this :

Appery('button_token').addClass('ui-disabled');
Appery('button_token').onclick=function(){time(this);}


When sending phone verification code, plus some JS code judgments can not be repeated within 60 seconds to send the veri

Posted: Fri Dec 27, 2013 3:43 am
by Illya Stepanov

Hi,

Where exactly you add this code?
Are there any errors in console?


When sending phone verification code, plus some JS code judgments can not be repeated within 60 seconds to send the veri

Posted: Fri Dec 27, 2013 4:10 am
by Crystal

Hello,
Image

Image
There are no any errors.


When sending phone verification code, plus some JS code judgments can not be repeated within 60 seconds to send the veri

Posted: Fri Dec 27, 2013 6:57 am
by Maryna Brodina

Hello!
Do you want to add to button Click handler another handler? That's enough just to call pretime(this);/pre instead preAppery('button_token').onclick=function(){time(this);} /prePlease also note it's not correct. Should be preAppery('button_token').on("click",function(){time(this);});)/pre


When sending phone verification code, plus some JS code judgments can not be repeated within 60 seconds to send the veri

Posted: Fri Dec 27, 2013 8:11 am
by Crystal

Hello,
How to enabled button.I have tried many methods
Appery('button_token').attr('enabled','enabled');
Appery('button_token').attr('enabled',null);
Appery('button_token').enabled = true;
Appery('button').attr('disabled', null);
Appery('button').attr('disabled', false);
Appery('button').attr('enabled',true);
So what's the correct method?


When sending phone verification code, plus some JS code judgments can not be repeated within 60 seconds to send the veri

Posted: Fri Dec 27, 2013 9:39 am
by Maryna Brodina

When sending phone verification code, plus some JS code judgments can not be repeated within 60 seconds to send the veri

Posted: Fri Dec 27, 2013 9:48 am
by Crystal

I have looked it and tried all this method,but it does't work.


When sending phone verification code, plus some JS code judgments can not be repeated within 60 seconds to send the veri

Posted: Fri Dec 27, 2013 10:03 am
by Maryna Brodina

preAppery("mobilebutton").addClass("ui-disabled");/prewhere mobilebutton - button name. Delete another code you use to disable button.


When sending phone verification code, plus some JS code judgments can not be repeated within 60 seconds to send the veri

Posted: Mon Dec 30, 2013 12:51 am
by Crystal

Hello,
Appery("mobilebutton").addClass("ui-disabled"); The code is used to disable the button, while I want to do is enable the button.


When sending phone verification code, plus some JS code judgments can not be repeated within 60 seconds to send the veri

Posted: Mon Dec 30, 2013 1:08 am
by Igor

Hello,

To enable button:
pre
Appery("mobilebutton").removeClass("ui-disabled");
/pre