![]() |
|
#1
|
|||
|
|||
Iframes and framesI have a problem with frames, I have two frames, and within one of them are two iframes, if something is pressed in one of the iframes, I want the other one to refresh.
But every thing I have tried with my limited knowledge of javascript seems to not work. Is there some way to do it using meta tags? Could anyone please give me any code which might work please. Anything is appreciated. Bobsam |
|||
|
#2
|
|||
|
|||
Re: Iframes and framesI'm not sure if this'll help, but it sounds like all you need to do is have things open in a "parent window". When something is "pressed", I assume you mean they click on a link and then you want everything to refresh. If you target the links to "parent window" it'll refresh the whole page (i.e. both frames) to whatever they click on. Typically all that entails is putting: target="_parent" in the link lines. I'm not sure if this answers your question, but I figured it couldn't hurt to tell you what came to mind...
|
|
#3
|
||||
|
||||
Re: Iframes and framesThe refresh problem was giving me a headache. Firefox seems to do whatever it wants with the cache, so using the history to do a refresh wasn't working. Then I remembered I solved this one before, so I dug into some old code and found the answer.
In Internet Explorer, there are two ways you can refresh a page (or frame) using Javascript. One way is to go to the current page in the history. Code:
Code:
Now for the other part of the question, when working with frames make sure you give names to your frames. HTML Code:
You can reference another frame that shares the same parent by first referencing the parent by "parent", then the sibling frame by its name. From namedFrameA, you can call a function bMyValentine() that exists in namedFrameB. Code:
For a more detailed demonstration, visit misterchucker.com/frames_in_frames or download the attachment. |
Recent GIDBlog
Toyota - 2009 May Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with using frames or iframes | looneytherat | Web Design Forum | 18 | 16-Nov-2003 08:42 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The