469,612 Members | 1,674 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,612 developers. It's quick & easy.

scrollIntoView() within an iframe

I have an iframe within a page, and i want a div in that frame to scroll to the top of just that frame when a link is clicked upon (so only the page in that frame should scroll up/down, and not the mother page containing the iframe). However, document.all.divID.scrollIntoView() is scrolling the entire page in the window to the top so as to put the div at the top, and not just the page in the iframe.

So first the page in the iframe scrolls up/down to put the div at the top of that iframe, and then the mother page itself scrolls up/down so that the iframe is at the top of the window, with the div at the top of the iframe.

Can someone help me handle this? Thanks a lot in advance!
Oct 25 '08 #1
1 3768
16,027 Expert Mod 8TB
Have you a link, or could you post some code?

Note that document.all won't work in most browsers. Use document.getElementById() to reference an element.
Oct 26 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Steve Murphy | last post: by
reply views Thread by Larry Brown | last post: by
13 posts views Thread by ukrbend | last post: by
1 post views Thread by Jim Satterfield | last post: by
reply views Thread by Ben Fidge | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.