Welcome Guest Search | Active Topics | Sign In | Register

Dialog Options
AndreaZ
Posted: Monday, October 20, 2008 8:48:57 AM
Rank: Advanced Member
Groups: Member

Joined: 10/20/2008
Posts: 75
Hello,
how can I close the Modal Dialog and change the calling window or send a variables to window that has call the modal dialog?
Thanks
Andrea
eo_support
Posted: Monday, October 20, 2008 9:58:37 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You can use some JavaScript to do it. For example, you can include the following HTML inside your dialog's ContentTemplate:

Code: HTML/ASPX
<input type="button" onclick="closeDialogAndDoSomethingElse('test')" />


Here closeDialogAndDoSomethingElse is a JavaScript function inside your page:

Code: JavaScript
function closeDialogAndDoSomethingElse(arg)
{
    //Close the dialog
    eo_GetObject("Dialog1").close();

    //Do something else
    window.alert(arg);
}


The key is, the dialog is not a different page. It's in the same page as the calling window. So whatever you would do with regular HTML element you can do it within your dialog.

Hope this helps.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.