|
Rank: Newbie Groups: Member
Joined: 7/4/2007 Posts: 6
|
If you have a Dialog which is using ContentUrl to display the content, is it possible to close a dialog from the ContentUrl code?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The ContentUrl is hosted inside an iframe. So you can just reference your parent page with "parent" in your JavaScript and then call whatever code in the parent page as if they are directly inside an iframe in your page. I wouldn't recommend you calling dialog.close() directly though. Calling dialog.close() directly from inside the child page is like trying to take down the ladder that you are currently standing on. Strange things happen sometimes when you do that. To avoid problems, you can try to set a timer in the parent page and then call dialog.close() inside the timer handler.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/4/2007 Posts: 6
|
I'm able to call the script on the parent page but I have no clue of how to do the timer stuff, do you mind a sample code?
BR Stefan
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, You would do something like
Code: JavaScript
window.setTimeout(function()
{
....your code here...
}, time_out_value);
Thanks
|
|