Welcome Guest Search | Active Topics | Sign In | Register

EO Dialog - Close Window Clientside Options
Droma81
Posted: Monday, June 24, 2013 4:33:11 PM
Rank: Member
Groups: Member

Joined: 11/16/2012
Posts: 11
I have a hyperlink which launches an EO dialog. The EO Dialog serves a form with a Submit button. I have several conditions to check for then if a successful code returned I automatically close dialog for user, otherwise I display error or issue. I'm having trouble closing my window consistently. It's funny because it works in other areas I use it but for some reason, it will not close window. Here is what I'm doing:

Page.ClientScript.RegisterStartupScript(this.GetType(), "Close Dialog", "parent.closeDialog('DialogScopeOfWork')", true);

I've also tried

this.ClientScript.RegisterStartupScript(this.GetType(), "Close", "self.close();", true);

But, window still will not close. What am I doing wrong here?
eo_support
Posted: Monday, June 24, 2013 4:37:13 PM
Rank: Administration
Groups: Administration

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

You can use this method to close the dialog:

http://www.essentialobjects.com/doc/1/jsdoc.public.dialog.close.aspx

Thanks!
Droma81
Posted: Monday, June 24, 2013 4:44:44 PM
Rank: Member
Groups: Member

Joined: 11/16/2012
Posts: 11
I tried that but get - 0x800a1391 - JavaScript runtime error: 'Dialog' is undefined. I tried changing Dialog to the same name as my Dialog and it threw same exception.
eo_support
Posted: Monday, June 24, 2013 4:48:09 PM
Rank: Administration
Groups: Administration

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

Please read this page on how to use our client side API:

http://www.essentialobjects.com/doc/1/clientapi_howto.aspx

Thanks!
Droma81
Posted: Tuesday, June 25, 2013 3:16:00 PM
Rank: Member
Groups: Member

Joined: 11/16/2012
Posts: 11
I'm not sure this is working as expected. I have several hyperlinks on the page which each reference the same dialog. should this matter.
Droma81
Posted: Tuesday, June 25, 2013 3:18:21 PM
Rank: Member
Groups: Member

Joined: 11/16/2012
Posts: 11
I've tried window.close() and self.close() and no luck. However, on pages where it calls Dialog by itself, it works fine.
eo_support
Posted: Tuesday, June 25, 2013 3:22:58 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi Droma81,

You need to follow what we tell you and need be able to read the documentation. We told you to call the dialog's close method. Nobody told you to call window.close(). If you do not understand any part of the documentation, you can ask us and we will be happy to help you further, but you can not keep asking about why B doesn't work when we ask you to do A. Please keep in mind that we won't be able to explain generic programming matters to you (such as DOM, JavaScript, etc). For those questions, you have to seek other resources.

Thanks!
Droma81
Posted: Tuesday, June 25, 2013 3:36:56 PM
Rank: Member
Groups: Member

Joined: 11/16/2012
Posts: 11
on Monday, June 24, 2013 4:44:44 PM I posted that it doesnt recognize the Dialog object. I tried adding the EO reference to page but still same results. This was why I tried the native JS calls.
Droma81
Posted: Tuesday, June 25, 2013 3:46:15 PM
Rank: Member
Groups: Member

Joined: 11/16/2012
Posts: 11
I'm using the following to open the dialog from hyperlink - function showDialogModalwithDimensions(control, url, title, width, height) {
var dlg = eo_GetObject(control);
dlg.setContentUrl(url);
dlg.setCaption(title);
dlg.resize(width, height);
dlg.show(true);
}

However, it just wont close.
eo_support
Posted: Tuesday, June 25, 2013 3:53:34 PM
Rank: Administration
Groups: Administration

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

You will need someone else to help you on JavaScript. DLL Reference has NOTHING to do with JavaScript. These are things that we are not in a position to teach you. In the future, please ONLY post question in our forum when you know the background knowledge about the question you are posting. Otherwise we won't answer the question because we will not explain the background knowledge to you. For example, we will tell you what property does what on our object but we are not in a position to explain the C# or VB syntax to set/get that property. Like wise is for JavaScript. It's very obviously to us that you lack basic knowledge about JavaScript. We will not explain JavaScript, or simply provide you sample code to do exactly what you wanted to do for you. You have to understand the basic things in order to get support from us. We won't fill that gap for you. We have warned you about this before and this will be the last time we clarify our position on this to you.

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.