This is a migrated thread and some comments may be shown as answers.

Open a PopOver from a function

3 Answers 253 Views
PopOver (Mobile)
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 2
Alan asked on 20 Jun 2013, 11:03 AM
Being new to JavaScript and Kendo I apologise if this is an improper use;

I want to put up a model message; for example if a user deletes something I want to put up an 'Are You Sure' message over the top of the login view. This is a trivial exercise in .Net programming but, as I said, I am new to JavaScript and Kendo. 

Looking through the Mobile Widgets the PopOver seems like a good way of doing of displaying a view over the top of another.
The demonstration shows how to display a PopOver in response to a button click but I cannot find any way of displaying it from a function.
  • Is this possible?
  • Keeping in mind this is a mobile; is there a better way to display?

Thanks for any pointers

Alan

3 Answers, 1 is accepted

Sort by
0
Accepted
Alan
Top achievements
Rank 2
answered on 20 Jun 2013, 03:51 PM
I have found that the Model View widget does what I want.
I can place 'Please Confirm...' in the header and two buttons in the body giving myself a nice little message box style dialog.
With a little work I can refactor my first attempt into something more generic for other 'Yes' 'No' scenarios.
I will mark this as answered as it covers my scenario; but as I said I am a newbie with Kendo so if there is a better way please let me know.

I would also still like to know if we can raise a PopOver from a function.

Alan
0
Kiril Nikolov
Telerik team
answered on 21 Jun 2013, 11:41 AM
Hello Alan,

First of all let me welcome you to the Kendo UI community!

I think that ModalView is a good approach for the login functionality you are looking for.
As a general information you can open the PopOver from a function using the built in open() method.

function openPopOver() {
     $("#foo").data("kendoMobilePopOver").open();
 }

More information regarding the PopOver widget can be found here:

http://docs.kendoui.com/api/mobile/popover

Regards,
Kiril
T
elerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Alan
Top achievements
Rank 2
answered on 21 Jun 2013, 11:49 AM
Many thanks

Alan
Tags
PopOver (Mobile)
Asked by
Alan
Top achievements
Rank 2
Answers by
Alan
Top achievements
Rank 2
Kiril Nikolov
Telerik team
Share this question
or