realoading an iframe

liunx

Guest
hi,<br />
i was wondering how to reload an iframe when some one clicks on a something...<br />
let me explain<br />
im building a site that has a iframe that loads a random image...and the main iframe contains each pages content. and the rest is the layout that never realoads so what i want is when someone clicks on a link it will load the respective iframe in the main window but also reaload the iframe contain the random picures so when someone goes to a new page they will see a new picture as well...<br />
<br />
hope that makes sense?!?!<br />
<br />
thanks <br />
dara<!--content-->try giving the iframe a name and use something like:<br />
<br />
<iframe name="imAnIframe" blah blah<br />
<br />
<a onclick="refreshIframe()">refresh it!!!</a><br />
<input type="button" onclick="refreshIframe()" value="refresh it!!!"><br />
<br />
<script><br />
<br />
function refreshIframe(){<br />
<br />
&nbsp;&nbsp;document.all.imAnIframe.window.refresh()<br />
<br />
}<br />
<br />
</script><!--content-->
 
Back
Top