Alex Van Name
Posts: 0
Joined: Mon Jun 30, 2014 7:36 pm

jquery popup as confirmation

This is very useful information. However, because of the dialog going on, some people find this a little confusing...I am also new to coding so this is harder for me to follow and use.

I like the smaller tutorials that show the examples with pictures like this one: http://devcenter.appery.io/tutorials/...

Yurii and Katya and Evgene and Maryna are awesome support programmers. You make a great team.

Shawn
Posts: 0
Joined: Sat Jun 21, 2014 11:13 pm

jquery popup as confirmation

Hi

I'm struggling to implement this. This is what I have done so far
Added a html component on my page with the following code (copied from above)

--------------------------------------------------------------------------------------------------


[url=http://#]OK[/url]
[url=http://#]NO[/url]
[url=http://#]Cancel[/url]

--------------------------------------------------------------------------------------------------

add a js script file with the following code (also from above)

--------------------------------------------------------------------------------------------------

function MessageDialog( caption, title, text, options ){
function closePopup( next ){
return function( event ){
next.apply( this, arguments );
$dlg.popup( "close" );
$dlg = null;
};
}
var $dlg = $( '.myDialog', $.mobile.activePage );
options = $.extend({}, {
onOK: function(){},
onNO: null,
onCancel: null
}, options) ;
$dlg.find( '.cancelButton' ).toggle( $.isFunction(options.onCancel) );
$dlg.find( '.noButton' ).toggle( $.isFunction(options.onNO) );
$dlg.find( '.okButton' ).off('vclick').on({ vclick: closePopup( options.onOK )});
$dlg.find( '.noButton' ).off('vclick').on({ vclick: closePopup( options.onNO ) });
$dlg.find( '.cancelButton' ).off('vclick').on({ vclick: closePopup( options.onCancel ) });
$dlg.find( '.dlg_caption' ).text( caption '' );
$dlg.find( '.dlg_title' ).text( title '' );
$dlg.find( '.dlg_text' ).text( text || '' );
$dlg.popup( "open" );
}

--------------------------------------------------------------------------------------------------

I'm not doing anything on page load or show but on click of a button I'm calling

--------------------------------------------------------------------------------------------------

MessageDialog( 'MyAppName', 'Alert Text' );

--------------------------------------------------------------------------------------------------

And nothing comes up. Nor is there any error on console.
Am I missing something ?

Kal
Posts: 0
Joined: Thu May 22, 2014 11:03 pm

jquery popup as confirmation

Hey, just a final note to this topic - this whole scheme is now mostly obsolete, because there is a native "Popup" component available in Appery.

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

jquery popup as confirmation

Hi Shawn,

Please follow this new solution:

1 Add Popup component on the page. http://prntscr.com/4997o1/direct

2 Fill this popup with components you need.

3 To open this popup you have two ways:

Code: Select all

 3.1 Add Event handle with type "open popup" [url=http://prntscr.com/4998oc/direct]http://prntscr.com/4998oc/direct[/url] 

 3.2 Use following JS code: 

pre

//To open popup
//Note you should replace "mobilepopup_2" with your popup component name.
Apperyio("mobilepopup_2").popup("open");

//To hide popup
//Note you should replace "mobilepopup_2" with your popup component name.
Apperyio("mobilepopup_2").popup("close");

/pre

Regards.

Shawn
Posts: 0
Joined: Sat Jun 21, 2014 11:13 pm

jquery popup as confirmation

The popup doesn't seem to work ? Tried code and event handler but nothing
comes up. Here is a link to my App...

http://appery.io/app/mobile-frame?src...

Trying to popup a window on click of Register button in Login Page

I'm giving a screenshot of popup settings.

Do I need to set anything more on the popup component ?

Image

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

jquery popup as confirmation

Hi Shawn,

You have added "click" event handler to open popup(it's ok), but not delete action "navigate to page" to "Userprofile".

Thus you have this behavior.

Please delete it to get your popup visible after register button clicked.

Regards.

Shawn
Posts: 0
Joined: Sat Jun 21, 2014 11:13 pm

jquery popup as confirmation

Okay I get it now ... if a popup is being used we cannot do a page transition as it will remove the popup. Awesome ! Thanks Yurii

Aisha Aslam
Posts: 0
Joined: Wed Aug 27, 2014 4:47 am

jquery popup as confirmation

sir
i have to build an android app for my project, as i am new with android programming that's why i need your help in this. sir i have tried to build an app from your website but i need more help from you people so i should be able to complete my project ..i need to build an android app which contain 8 or 9 buttons and functionality of the button should be such that when i press a button(for car start) it should open the new window which further contain two buttons 1-start with blue tooth 2- start with GSM (i-e through text message) and when i press the 1st button it should automatically open the blue tooth app installed on my cell phone and like wise when i press the 2nd button it should automatically open the create message icon of my cell phone ..please help me out in this

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

jquery popup as confirmation

Aisha,

Please, find our reply here: https://getsatisfaction.com/apperyio/...

Return to “Issues”