Click to See Complete Forum and Search --> : Stop html page from jumping to iframe first


Charlotte
06-01-2008, 01:43 AM
Hi,

This may be simple but I'm not sure how to stop this behavior. I have a page with an iframe div at the bottom. When the page first loads it always starts at the bottom where the iframe is so the user is forced to scroll up to start of the page.

btw...this only happens when an src default page is referenced.

1) How can I get the page to always load starting at the top of the page?

Using iframe code like...

<div id="frame">
<iframe name="framename" width="1000" height="1000" align="bottom" src="http://www.yahoo.com/"></iframe></div>

2) Is there another work around, such as having a default image or text to place in the frame initially that would not cause this problem? I would be open to that as well.


Thanks!

Fang
06-01-2008, 10:16 AM
A bit of JavaScript can help:window.onload=function() {location.href='#';};