0

I can't seem to reload the parent page from within an iframe even though the domain for my iframe and the parent page appear to be the same. The IFRAME was created dynamically, rather than in the HTML page source, so could that be the problem?

The iframe I'm working with is here http://www.avaline.com/ R3000_3 once you log in.

You may use user:[email protected] pass: test03

Once logged in, hit the "order sample" button, and then hit "here" where it says "Your Third Party Shipper Numbers (To enter one, click here.)".

I tried using javascript statements window.top.location.reload(),window.parent.location.reload(),window.parent.location.href=window.parent.location.href but none of those worked in FF 3.6 so I didn't move on to the other browsers although I am shooting for a cross-browser solution.

I put the one-line javascript statements inside setTimeout("statement",2000) so people could read the content of the iframe before the redirect happens, but that shouldn't affect the execution of the statements...

I wish I could test and debug the statements with the Firebug console from within the Iframe.

1
  • 1
    Firebug knows about the iframe and the page within it. If the Firebug console is open, you can do console.log() etc and you'll see the output. Commented May 6, 2010 at 18:06

1 Answer 1

1

Your script tag is:

<script type="test/javascript">

That might be the problem :-)

If changing that to "text/javascript" doesn't fix the issue, try changing the query string slightly:

window.top.location.search = window.top.location.search + '&dc=' + (new Date).getTime();
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you! that fixed it. I ended up using setTimeout('window.top.location.reload()',500); and it worked fine in FF3.6 so now I'm moving on to the rest of the slew of browsers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.