views:

282

answers:

1

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  A: 

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();
Josh
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.
Lauren