launch pop up in javascript
Hi,
im trying to launch a pop up at the end of a javascript action, ive tried this
Appery.navigateTo('piepopup')
but nothing happens.
thanks
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
Hi,
im trying to launch a pop up at the end of a javascript action, ive tried this
Appery.navigateTo('piepopup')
but nothing happens.
thanks
Hello!
[quote:]at the end of a javascript action[/quote]Could you post entire JS code?
hi,
thank you for quick response, this javascript launches on a button click, the other parts work fine
var score = sc++;
window.score = sc;
window.scnow=sc;
window.xyhold = xy;
Code: Select all
if (sc==2) {
xy=25;
window.xyhold = xy;
Apperyio('xyhold').val(window.xyhold);
Apperyio('score_label').text(window.scnow);
Apperyio('score_input').val(window.score);
} else if (sc==3) {
xy=20;
Code: Select all
window.xyhold = xy;
Apperyio('xyhold').val(window.xyhold);
Apperyio('score_label').text(window.scnow);
Apperyio('score_input').val(window.score);
Code: Select all
} else if (sc==4) {
xy=15;
window.xyhold = xy;
Apperyio('xyhold').val(window.xyhold);
Apperyio('score_label').text(window.scnow);
Apperyio('score_input').val(window.score);
appery.navigateTo('piepopup');
}
Hi David,
Here is code how to open popup component via JS:
pre
//Note: you should replace "mobilepopup_80" with your popup name.
Apperyio("mobilepopup_80").popup("open");
/pre
And here is code how you can close popup:
pre
//Note: you should replace "mobilepopup_80" with your popup name.
Apperyio("mobilepopup_80").popup("close");
/pre
Regards.
Thanks works great