Welcome Guest Search | Active Topics | Sign In | Register

Refresh/reload EO.Dialog from parent Options
Sean Vesce
Posted: Tuesday, November 30, 2010 3:37:56 PM
Rank: Member
Groups: Member

Joined: 10/26/2010
Posts: 16
Can you advise how best to force a refresh/reload of an eo.dialog from its parent page in JS?

Thanks in advance.

Sean
eo_support
Posted: Tuesday, November 30, 2010 6:11:40 PM
Rank: Administration
Groups: Administration

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

If your dialog loads a separate page, then the page is hosted inside an iframe. In that case you would just use "parent.whateverMethod" to call whatever method in your parent page. Note that if you wish to reload the page, you will want to use a timer inside your parent page code to delay the call. For example:

Code: JavaScript
//This function is in your parent page
function reload_page(url)
{
    setTimeout(function()
    {
        do_reload_page(url);
    }, 100);
}

function do_reload_page(url)
{
    //load the new page
    .....
}


Code: JavaScript
//This code is in your dialog page
parent.reload_page(new_url);


Note that the code calls setTimeout to delay the actual call. This is usually necessary if you are calling the code inside a dialog event so that the dialog will have a chance to finishes its event firing flow before being destroyed by reloading.

As to how to reload a Url in a page in JS, it would be outside of the scope of our support. However there should be a lot of information online about that.

Thanks!
Sean Vesce
Posted: Wednesday, December 1, 2010 2:26:30 PM
Rank: Member
Groups: Member

Joined: 10/26/2010
Posts: 16
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.