Hi, I'm new here.
I'm teaching my self to write a web site to help my sister's new business. It's in a three column format.
I put an small iframe on the main page's right column to show her blog, and I put in an anchor point (#iframe_target ) in the blog so that the iframe shows the beginning of the content of the blog rather than the top left corner:
Once I added this I now get that the whole webpage loads, then as soon as the iframe content loads, it scrolls up (about the same amount as the iframe content scrolls up, I think, but haven't verified).
Can anyone explain what is happening? And better yet, give me idea how to fix either the initial problem (load the iframe content to the specific part of the webpage I want to show) or the subsequent problem (page scrolls up when iframe content loads)
I have one fix, which is to use the following function
and then use it as follows:
But this means the page loads, scrolls up and scrolls down, and is just messy and inelegant.
Any help will be greatly appreciated!
I'm teaching my self to write a web site to help my sister's new business. It's in a three column format.
I put an small iframe on the main page's right column to show her blog, and I put in an anchor point (#iframe_target ) in the blog so that the iframe shows the beginning of the content of the blog rather than the top left corner:
Code:
<iframe src="http://DOMAIN.blogspot.com#iframe_target" width="215" height="287"><p>Your browser does not support iframes.</p></iframe>
Can anyone explain what is happening? And better yet, give me idea how to fix either the initial problem (load the iframe content to the specific part of the webpage I want to show) or the subsequent problem (page scrolls up when iframe content loads)
I have one fix, which is to use the following function
Code:
function jumpScroll() {
window.scroll(0,0);
}
Code:
<body onload="javascript:jumpScroll()" >
Any help will be greatly appreciated!
Comment