Javascript Panel Height & Width
I tried the javascript code below and pw = 0 when in appery's property screen it' set to 250. What is wrong? Thanks.
var panel = Appery("panel_2");
var ph = panel.height();
var pw = panel.width();
alert(pw);
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/
I tried the javascript code below and pw = 0 when in appery's property screen it' set to 250. What is wrong? Thanks.
var panel = Appery("panel_2");
var ph = panel.height();
var pw = panel.width();
alert(pw);
Hello,
You code should work. How did you invoke this code? Please ensure that Panel element name is "panel_2".
You should try to add this code on some button click action. It's not working because alert action triggering before creating panel element.
Thanks, your suggestion worked. How do i get the default page resolution 320x480 instead of the panel_2 dimensions?
Project - App Settings - Default Page Size
I know that you can manually go to the settings to get the page size. I meant how do i get the page size through javascript? Thanks.
Hello! Try code$(window).width()/code and code$(window).height()/code