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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IFRAME Issue

Status
Not open for further replies.

webgs

Programmer
Oct 30, 2001
59
US
I'm using <IFRAME> in a middle column of a static HTML page. I'm calling a second HTML page in the <IFRAME> that includes a web form. The form is quite long and as a result I have to scroll down to get to the submit button. When I submit the form, my browser window stays focused at the point where my submit button was on the previous page. My "thank you" message loads at the top of the page and I need to scroll up to see it. This also happens with standard links. Does anyone know of a way to tell the resulting screen to focus at top like an anchor tag does? I've thought of using the "onload" function in the <body> tag but cannot get it to work.

Any help would be appreciated.

Thank you!
 
Create an onsubmit function for the framed form, and before the function submits the form, execute:
Code:
window.parent.scrollTo(0,0);


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top