471,891 Members | 1,934 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,891 software developers and data experts.

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 4248
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 Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.