TomMcCann
Posts: 0
Joined: Sat Aug 17, 2013 2:27 am

How to use popups?

I've tried building a dialog box with a popup. The popup contains a grid with an input control and a button whose click event closes the popup.

When I call the popup from a button on the main page, the popup is displayed (very badly) but the 'Close' button in the popup has no effect.

Also, the popup just looks and behaves like a page, I was expecting it to 'overlay' the page it is called from.

I have definitely created the popup as a popup rather than a page. I'm using the click events of the buttons to open and close the popup.

I can't find any documentation on how popups should be used in appery. Can you please point me towards some doc or tutorial or example. Thank you.

Oleg Danchenkov
Posts: 0
Joined: Tue Apr 30, 2013 5:51 pm

How to use popups?

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

How to use popups?

hello, I had same problem, and I found solution in another post:
Paste this in Custom JS:

var toast = function(msg){
$(""+msg+"")
.css({ display: "block",
opacity: 0.90,
position: "fixed",
padding: "7px",
"text-align": "center",
color: "pink",
width: "270px",
left: ($(window).width() - 284)/2,
top: $(window).height()/2})
.appendTo( $.mobile.pageContainer ).delay( 5500 )
.fadeOut( 700, function(){
$(this).remove();
});
}

-then, on button click run this JS:
toast("message");

The message dissapear after 5 seconds, if you want to add a "close button" there are another post similar to this, with the code for an overlaying pop up.
good luck!

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How to use popups?

Hi Alex,

Thank you for sharing this!

Return to “Issues”