Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing an IFrame from the parent window

Status
Not open for further replies.

DavidJA

Programmer
Jan 10, 2002
58
AU
Hey all!

I have a form with 2 iframes on it, and I would like to the concent of one of the iframes. I could do document.all.iframeSearch.src = 'AgencyOrderFormItemsTaskTypeSearch.asp?' + qs but then the iframe scrolls back to the top.

I basicly want to be able to do something like document.all.iframeSearch.window.go(0), but it does not work.

Does anyone know how I can do this?

Thanks in advance
 
use jumps in you iframe page ie

<A name=&quot;Question1&quot;></A>Q1. this is question1<br>
...

...
<A name=&quot;Question2&quot;></A>Q2. this is question2<br>

..
and so on now to bring question 2 to the top of the page from the parent window you can say:


document.all.iframeSearch.src = 'AgencyOrderFormItemsTaskTypeSearch.asp?#Question1'

to show question 1
 
Got it! To refresh the content of an iFrame from the parent window, use the following syntax:
document.frames(&quot;iframeResults&quot;).document.execCommand(&quot;Refresh&quot;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top