jQuery: refresh one iframe from another via parent

Hello, everyone,

[COLOR=#f0ffff]I’ve got a simple page (index.cfm) that has two iframes within:


<div id="navDiv"><iframe src="nav.cfm" height="50" width="100%" name="nav" id="nav">Upgrade your browser!</iframe></div>
<div id="contentDiv"><iframe src="about:blank;" height="500" width="100%" name="content" id="content">Upgrade your browser!</iframe></div>

When a link in ‘nav.cfm’ is clicked, I have the href of that link (let’s say ‘page1.cfm’) as the source of the second iframe.

If page1.cfm is a form that will insert data into a database, and part of nav.cfm displays data from the database, how can I get the first iframe to refresh (using jQuery) after the second iframe posts the data?

Right now, at the end of the data insert in the second iframe, I’m using:


parent.$('#nav').attr('src',function(i,val){ return val; });

Sadly, this is causing the parent to refresh, not the intended iframe. What am I missing?[/COLOR]

NEVERMIND… :slight_smile: Just noticed that when the first iframe loads, it ‘loads’ the second one, so every refresh of the first automatically triggers a refresh of the second. (I’ve been sick the last few days.)

V/r,

:slight_smile: