|
Rank: Member Groups: Member
Joined: 3/9/2009 Posts: 25
|
Hi,
Is there anyway I can find out if a dialog is active? Or find out the current dialog? Basically I have a bit of code which needs to shut down the crrent window. I have tried
<div onclick="eo_GetContainer(this, 'Dialog').close();"> Click here to close dialog </div>
but it just come back as null and I dont really want to have to click a link either
Thanks
Steve
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Your code is correct as long as the HTML is inside the dialog. If the code is outside of the dialog, the easiest way is to use eo_GetObject("Dialog1").close().
I am not sure what you meant by "don't really want to have to click a link". Don't you want user to click something to close the dialog?
Thanks
|
|
Rank: Member Groups: Member
Joined: 3/9/2009 Posts: 25
|
Hi,
Basically I am loading a user control in a dialog but depending in which option a user picks it could be one of 3 dialogs. When they click finish the asp.net page will loop and then I was going to close it through javascript on the load event. My problem is I dont know which window the end user is currently in so cant locate it by name.
I did try get container but it came back null.
So what I need is a way of referencing the containing dialog either through the front end or possibly via the back end something like this.parent.dialog.name
Thanks for your time
Steve
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi Steve,
eo_GetContainer should definitely work in this case. Can you provide a test page so that we can try to run it here?
Thanks!
|
|