Parent Window Refresh Onload?

Jul 20, 2005

How can I make a parent window of a iframe refresh after a certain site is loaded in the iframe?

View 1 Replies


ADVERTISEMENT

Iframe Refresh From Parent Window?

Mar 17, 2011

Alright I have an Iframe, and at the end of that Iframe I have set a variable with JS to be equal to TRUE, indicating that the page has run through the script. I then check that the iframe from the parent window for that variable, if it has not been set yet (or does not equal true) it reloads the iframe.

The code works fine FF and Opera. However in IE it does not reload the frame if it is not true, and in Chrome it alerts undefined and does not reload the frame I have tried accessing the frame through the dom and it did not work for me, and i have also tried simply adding a tail to the iframes source with no success. :confused:

[Code]...

View 2 Replies View Related

Have A Refresh Button On The Parent Window

Aug 30, 2007

Using JavaScript, how do I open a Child Window, upon clicking a link in the Parent Window? Is it possible to have a Refresh button on the parent window, that refreshes the parent window onclick?

View 2 Replies View Related

Refreshing Page - Refresh The Parent Window Doesn't Work In IE8?

May 9, 2011

why my simple javascript to refresh the parent window doesn't work in IE8? When the child window closed, it reopen another new window for the page I want the parent window to refresh and nothing happened on the parent window.How can I make it load the page from parent window instead of a new window ??? it works perfectly in other browsers but not IE.

Code:
<script language="JavaScript">
<!--
function rent() {[code].....

View 1 Replies View Related

Refresh Parent From IFrame Makes Refresh Loop In FF Only?

Jan 2, 2009

I have this code in a page that appears in my iframe if requested from parent:

<script type="text/javascript">
parent.rrr();
</script>
The parent code is:
function rrr() {
javascript:location.reload(true);
}

So, the person clicks a link from the parent, it does a php process in a hidden iframe, which then tells the parent page to refresh. The only problem is that it puts Firefox in a constant loop of refreshing. IE and Chrome work fine. They refresh once and stop.

Though the src code opens the iframe like so: <iframe src="" style="display:none; height:1px;" name="hdplus" id="hdplus"></iframe> Firefox seems to refresh the page with the memory of the child page being in the iframe, constantly looping the child request to refresh the parent.

Why won't Firefox just accept that no page should load in the iframe, as stated in the code? I need to stop this loop, which means I need to get firefox to reset the iframe as it reloads the page.

View 2 Replies View Related

Which Loads Faster, Body Onload Or Window.onload

Dec 3, 2005

I wander what gets loaded the fastest (1-2 or 3) in what succession:

<head>
<script type="text/javascript">
function andAction() {
// doing stuff
}
</script>
</head>

<body onload="andAction();">
<script type="text/javascript">andAction()</script></body>

just in the head and nothing more

This I am sure off:

<head>
<script type="text/javascript">
window.onload = function andAction() {
// doing stuff
}
</script>
</head>
<script type="text/javascript">andAction()</script></body>

just in the head and nothing more (should be 1)

Third and last which is faster:

body onload or window.onload

View 3 Replies View Related

Window.onload And Body.onload Differences

Jul 23, 2005

I'm seeing a difference in behaviour between

window.onload = f();

and

<body onload="f();">

Specifically, window.onload appears to fire before all the elements of
the page have been rendered. As the difference is consistent across
IE/Moz/Opera, I'm assuming it's deliberate - can anyone point me
towards where this behaviour of window.onload is defined in the
documentation? TIA. Code:

View 2 Replies View Related

Div Not Resizing Onload Until Refresh?

Feb 6, 2010

I'm building a page here: http:[url]....I have some JS in place which you can see in the source at the bottom of that page that sets the width of the box surrounding the dark grey image to a certain width (image width + 64px).The problem is that when I first visit that page the box resizes to a really thin width and the image flows out of it, however if I refresh the page the box resizes to the correct width that I want it. Does anybody know why it does this?

View 1 Replies View Related

Passing Values Onload From Iframe To Parent Page?

Aug 5, 2009

I have a parent page containing an iframe. The parent page has a menu in it which opens links in the iframe. I want to highlight different bits of the menu according to which page has loaded in the iframe.

So I would like to do something like this:

1. Use PHP to extract the file name (minus 'php' at the end, of the page loaded within the iframe (which I can do fine).

2. Use javascript onload so that the iframe sends this value (say 'pagename') to the parent page when it loads any page in the iframe.

3. The parent page, having received that variable into its header, will adjust a line of css to something like: .pagename {background-color:red;}

And so the menu link for pagename.php will be colored red

4. When pagename1.php is loaded into the iframe, that will send 'pagename1' to the parent page, change the CSS in the head, and therefore change the highlighted menu item from pagename to pagename1

Is this possible? And easy? There seems to be a lot of stuff online about moving variables from iframes, but mainly in the context of form entries from an iframe to a parent, eg here:

[URL]

parent.function_name(); seems to be needed along the way. But I am not sure how to proceed.

View 14 Replies View Related

Refresh Parent.parent From A Pop Up?

May 12, 2010

I have a page. In that page is an iframe, lets name it 'A'. inside A there is another iframe 'B'. there is a link on that page which on click opens a popup. In that pop up, there is actually a document upload facility. Now i want that after every upload (onSubmit), iframe A should refresh.

have done it many times but today its not working.

function validate() {
(window.parent.opener.location.href)=(window.parent.opener.location.href);
window.parent.opener.location.reload(true);// this is tried as well
}

View 3 Replies View Related

Child Pop Up Race Condition Using Window.open Need To Detect Window.onload

Nov 22, 2011

I am trying to pop up a window and then do stuff(set flags) when the content of the new window is done loading. For this I am trying to detect the window.onload of the pop-up child window but so far I am unsuccessful. I believe my problem is that the URL of child window is on different domain, than the one of the opener(parent) so that the window.onload is not being called. Though this may change, at the moment I do not have access to the code for the page I'm opening up in the pop-up. Im pretty new to web development.

[Code]....

View 3 Replies View Related

OnLoad Function - Texteditor To Show Inner HTML Of Parent Doucument By Div Id

Jun 16, 2010

I have a popup window that calls a texteditor. I want the texteditor to show the inner HTML of the parent doucument by div id.

When I call the function through a submit (in child window) it workks great, but I want innerHTML to be added when child page loads.

I have tried calling function in body onLoad=getparent; tries adding it to inner script where it calls the editor , again onLoad=getparent;

Tried with and without () i.e onLoad=getparent();

Child window code:

View 2 Replies View Related

Refresh The Parent Page?

Jun 1, 2011

I have the following script that refreshes the page that opened the pop up window, after the pop up window is closed.

if(window.opener && !window.opener.closed)
{
window.opener.location.reload(true);
}
window.close();

It is working fine in IE but it's not refreshing the parent page in FireFox.

View 2 Replies View Related

Refresh Parent Page

Jun 13, 2006

I'm unsure if this is a php or javascript problem as I am new to javacript...

I am using a javascript:popup('page.php') command to open a popup box and allow the user to make a few changes to a mysql database. However the values that are changed are displayed on the parent page (the one that the user clicks the popup link on).

Is there a way to refresh the parent page from the popup, so when they submit the form in the popup the parent automatically refreshes with the new values (rather than the user having to manually refresh the page)?

View 2 Replies View Related

How To Refresh Parent Iframe

Dec 8, 2011

Normally this would be pretty straight forward, but I've tried a bunch of examples and none of them work.

I am attempting to refresh a menu I have in an iframe. I will explain. I have a index.php page with 3 iframes in it (this is the parent). The top frame is for the site logo, the left frame is the menu (I call it menuframe) and the frame beside that is for the page content (contentframe).

I have the menu with various options, when the user logs in it should refresh and show some addition options (logout, admin area, etc).

The login page appears in the contentframe, once the user logins I want the menuframe to refresh to list these new admin options. I know my php session is working fine because if I manually refresh the menuframe it shows the items.

[Code]...

View 2 Replies View Related

Refresh Parent When Popup Get Submitted

Nov 19, 2010

I'm using submodal-1.6 for popup. When the popup closes I wanted parent page to refresh.I've tried the following

window.opener.location.load();
window.opener.location.load(true);
location.load();
window.parent.location.reload();

All works for IE, but when coming to mozilla ,firefox the refresh is a step delayed, i.e when I open my popup to add an itme to my cart on parent page ,for the first time it does not show anything , but when I try to add another item , the first one shows.

View 1 Replies View Related

Refresh Parent When Popup Closes

Nov 18, 2010

I'm using submodal-1.6 for popup. When the popup closes I wanted parent page to refresh.I've tried the following

window.opener.location.load();
location.load();
window.parent.location.reload();

All works for IE, but when coming to mozilla ,firefox the refresh is a step delayed, i.e when I open my popup to add an itme to my cart on parent page ,for the first time it does not show anything , but when I try to add another item , the first one shows.

View 1 Replies View Related

Reloading Parent If Iframe Does Not Refresh?

Oct 16, 2011

I have an html script that contains an iFrame.

The partent contains a display header and the iFrame contains rows of data, the iFrame is set to refesh every 20 seconds.

There are times for whatever reason the iFrame does not refresh. Is there a way I can have some sort of timer in the parent that reload the set if the iFrame has not refreshed after 20 seconds.

View 2 Replies View Related

Reload/refresh Parent Web Page From An Iframe

Nov 5, 2006

My main browser page has an iframe. Whenever the iframe is reloaded
(updated), I want to automatically refresh the main webpage as well.
How can this be done, preferably using javascript?

View 2 Replies View Related

Refresh Parent Page With Iframes On Any Click?

Jan 28, 2009

I have a PHP page with an iframe where I load PERL/CGI content. Now of course when I click anything on the parent page the iframe refreshes with it.

But what I really want is to have the parent page refresh when anything inside the iframe is clicked. Of course the iframe should not refresh and go to initial view then. So basically I am looking for a way to have ONLY the parent page refresh every time something in the frame is clicked or to have the parent page and the iframe refresh but with the iframe retaining the last user position.

View 4 Replies View Related

Send Refresh Command From Pop-up To Parent Frame?

Feb 25, 2009

I want to send a refresh command from my pop-up screen to a i frame in the parent document.

I have written the following script code...

View 4 Replies View Related

Close Popup And Refresh Parent Page

Nov 8, 2005

here's what i need to do:

1. open popup
2. on submit -- run the asp to process results and then
3. close the page
4. refresh the paretn page


how can I do this? can anyone help me?

View 2 Replies View Related

Refresh Div Area In Parent When Close Child?

Jul 14, 2010

I have a parent page that when load populate a div area from database.

I want when I click and open a child page, do some selections(for example check some checkboxes) and press submit, the child will close and the div area in parent will refresh .

View 2 Replies View Related

Not Detecting Window.onload From Child Pop-up Window?

Nov 22, 2011

I am trying to pop up a window and then do stuff(set flags) when the content of the new window is done loading. For this I am trying to detect the window.onload of the pop-up child window but so far I am unsuccessful. I believe my problem is that the URL of child window is on different domain, than the one of the opener(parent) so that the window.onload is not being called. Thought this may change, at the moment I do not have access to the code for the page I'm opening up in the pop-up. Im pretty new to web development.

Heres my js code

Code:

//globals
var popupHandle = null;
var openingWindow = false;
function popWindow(URL){

[Code]....

Note: The whole reason why I am doing this is because if its the first time I am clicking on the button that will open this pop up window and I click it repeatedly very quickly, a new pop up is opened for each time I clicked eventhough the window.open is supposed to reuse the window if it has the same windowId. The first call to window.open takes long enough to not have a window handle and allow other clicks to get through.

View 2 Replies View Related

Automaticaly Clsoe The Parent Window When The Child Window Opened In Firefox?

Mar 24, 2011

i have this code i need to close the parent.html window when the child window opened, i need the code for that working well in IE and Firefox Parent.html

<HTML>
<SCRIPT TYPE="text/javascript">
function sendTo()
{
window.open('child.html','_blank','resizable=yes,width='+(screen.width-500)+',height='+(screen.height-500)+'');
}
[Code]...

View 2 Replies View Related

Window.opener Either Blocks When I Referesh The Parent Page Or Opens In New Window?

Aug 11, 2011

I am trying to usw window.open , upload a file in the child window and then referesh the parent window. But once upload is done, window . opener .location.href or opener.location.replace sends a message back but I get a pop up blocker, so if I turn pop up blocker off, it opens in new page. I just want the parent page to refresh on the same window. This works on some employees stations but not on others..I don't know if there are any settings on IE that need to change, I tried everything...weird. does any one done this before?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved