tags:

views:

44

answers:

3

This is kind of complicated, so bear with me. I have a form that is inside a HTML frame. When I click the button on that form I would like to update the HTML that is outside of that frame.

I'll try to illustrate this as best I can

Page Layout

  • Header Html Content (not in a frame)
  • Side Menu Frame
  • Content Menu Frame

I have some HTML in the Header section of the page that I would like to update when a user clicks on a form button in the Content Menu Frame.

The problem is I don't know how to access the HTML is the Header section from within the frame. So currently I have to hard refresh the page (ctrl + f5) for the changes to take place.

Thanks!

**Update

Using old school style frames, not iframes

+1  A: 

If you're talking about an iFrame, javascript in an iFrame can't access the HTML in the parent of that frame, you'll have to use a hard refresh.

GSto
+2  A: 

you can access the head element of the top frame via

window.top.document.getElementsByTagName("head")[0];
Manu
A: 

I found one that worked.

parent.top.location.reload(true)

or something along those lines.

chobo