We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Modal dialog from another

Thread ID:

Created:

Updated:

Platform:

Replies:

118583 Mar 20,2015 12:55 PM UTC Mar 23,2015 12:47 PM UTC JavaScript 1
loading
Tags: ejDialog
Rami Seelam
Asked On March 20, 2015 12:55 PM UTC

How can I open a modal dialog from another modal dialog and handle events when child dialog is closed?

Sasikala Nagarajan [Syncfusion]
Replied On March 23, 2015 12:47 PM UTC

Hi Rami,

Thanks for using Syncfusion products,

We have analyzed your query(how to open dialog inside the another dialog). We have prepared the sample based on your requirement.

Please get the sample from below location,

Sample

In given sample we have created two dialog (defined the one dialog inside another dialog).

When the page has been loaded, we have initialized these two dialogs in script with showOnInit (Defines the Dialog window to open/close state) API value as false in child dialog.

Then We have opened the child dialog in button (child_dialog_open) click event.

Please refer the below code snippet

[script]

$("#lognForm").ejDialog(

{

enableModal: true,

enableResize: false,

width: 300,

position: { X: 363, Y: 110 },

close: "onDialogClose"

});

$("#child_dialog").ejDialog({ showOnInit: false, close: "close" });

$("#selectCar").ejDropDownList({ targetID: "carsList", });

[script]

$("#child_dialog_open").ejButton({ size: "small", width: "100%", click: "dialogopen" });

[script]

function dialogopen() {

$("#child_dialog").ejDialog('open');

}

handle events when child dialog is closed

In given sample when we close the child dialog, the selected value of child dialog’s dropdown list is sets to parent dialog textbox (in cars list textbox).

Please refer the below code snippet:

function close(args) {

var obj = $("#selectCar").data("ej-dropDownList");

$("#car_name").val(obj.getValue());

}

Please check with the given sample to know more about handing the close event of dialog and let us know if you have further queries.

Regards,

Sasikala Nagarajan


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;