David wyatt
Posts: 0
Joined: Mon Sep 15, 2014 7:12 pm

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

launch pop up in javascript

Hello!

[quote:]at the end of a javascript action[/quote]Could you post entire JS code?

David wyatt
Posts: 0
Joined: Mon Sep 15, 2014 7:12 pm

launch pop up in javascript

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');
}

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

launch pop up in javascript

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.

David wyatt
Posts: 0
Joined: Mon Sep 15, 2014 7:12 pm

launch pop up in javascript

Thanks works great

Return to “Issues”