Page 8 of 8

jquery popup as confirmation

Posted: Wed Jul 23, 2014 3:40 pm
by Alex Van Name

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.


jquery popup as confirmation

Posted: Fri Aug 01, 2014 3:32 pm
by Shawn

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 ?


jquery popup as confirmation

Posted: Sun Aug 03, 2014 6:37 pm
by Kal

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.


jquery popup as confirmation

Posted: Sun Aug 03, 2014 10:03 pm
by Yurii Orishchuk

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.


jquery popup as confirmation

Posted: Mon Aug 04, 2014 9:23 am
by Shawn

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


jquery popup as confirmation

Posted: Mon Aug 04, 2014 11:25 pm
by Yurii Orishchuk

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.


jquery popup as confirmation

Posted: Mon Aug 04, 2014 11:37 pm
by Shawn

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


jquery popup as confirmation

Posted: Wed Aug 27, 2014 4:48 am
by Aisha Aslam

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


jquery popup as confirmation

Posted: Wed Aug 27, 2014 5:46 am
by Evgene Karachevtsev

Aisha,

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