Welcome Guest Search | Active Topics | Sign In | Register

dialog is open Options
stever
Posted: Wednesday, June 3, 2009 6:17:36 PM
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
eo_support
Posted: Wednesday, June 3, 2009 9:52:11 PM
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
stever
Posted: Thursday, June 4, 2009 4:10:50 AM
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
eo_support
Posted: Thursday, June 4, 2009 8:33:29 AM
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!


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.