# Chrome iframe does not reload



## Ton (Mar 4, 2009)

Hi All

I am looking for a workaround for Google Chrome

When I use Chrome and access

http://www.speedcubing.com/events/Indonesian2009/competitors.html

the reload function of Chrome does not reload the iframe , which has the registrations . So after I add a competitor, Chrome reload does not refresh the new list in the iframe

As Workaround I link to the URL and reload it

I am looking for HTML/SCRIPT code that does the job .eg. a refresh button

I thought it was like this:


> <html></body>
> <form>
> <input type="button" value="refresh" onClick="parent.iFrame1.location.reload();">
> </form>
> </body></html>



But this has no effect

HELLPPPPPPP

Ton


----------



## Lucas Garron (Mar 4, 2009)

Call it during onload, not onclick?


----------



## JBCM627 (Mar 4, 2009)

@Lucas, there is a button on the page intended to reload the iframe content.


I have had experience with browsers being sort of picky about referencing frames using javascript... here are a couple ideas:

You may need to do this?

```
onClick="[B]window[/B].parent.iFrame1.location.reload();"
```

If not, try a workaround? Not 100% sure about the syntax on these, but maybe one will work:

```
onClick="window.iFrame1.location.href=window.parent.iFrame1.location.href;"
onClick="window.iFrame1.history.go(0);"
onClick="window.frames[0].location.reload();"
```


----------



## Ton (Mar 4, 2009)

No , I am lost , does not work with Google Chrome


----------



## JBCM627 (Mar 4, 2009)

Here's a sort of messy workaround that works for me in all browsers:


```
<input type="button" value="Reload" onClick="document.getElementById('iFrame1').innerHTML='<iframe width=673 height=700 src=\'http://www.worldcubeassociation.org/results/competition_registration.php?competitionId=IndonesianOpen2009&list=1\' scrolling=\'yes\' frameborder=\'1\'></iframe>';">
```


----------



## Ton (Mar 5, 2009)

JBCM627 said:


> Here's a sort of messy workaround that works for me in all browsers:
> 
> 
> ```
> ...



Works for IE but not with Google Chrome , I assume a major bug in Chrome

So the only workaround is access the URL of the iFrame and reload from there.


----------



## pjk (Mar 5, 2009)

I've heard of iFrame problems related to Google Chrome, and I'm guessing this is one of them. Google Chrome isn't rendering that function correctly.

I'd suggest just simply steering away from iFrames unless you absolutely have to have them. I've always disliked speedcubing.com using them.


----------



## JBCM627 (Mar 5, 2009)

Ton said:


> Works for IE but not with Google Chrome , I assume a major bug in Chrome



Do you have the most recent version of Google Chrome? It works fine for me in it.

You could also let people refresh the page manually, and just not bother making a button to refresh it.

I agree with PJK too... don't use iframes if you can avoid it.


----------



## hr.mohr (Mar 5, 2009)

frames = pure evil


----------

