473,398 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

scrollIntoView() within an iframe

49
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 5046
acoder
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

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

Similar topics

3
by: cmay | last post by:
I am trying to use scrollIntoView to programatically scroll an area on one of my pages. It wors just like you would expect it to when the page itself doesn't have any scrolling (the page is...
1
by: Steve Murphy | last post by:
Do .scrollIntoView, .focus, and .select work in Safari, or am I just doing something wrong. The following code works in Firefox, Netscape, and IE on both Mac and Windows, but fails on Safari: ...
0
by: Larry Brown | last post by:
Hi, I'm working on an ASP.NET 2 application, with framework 2.0 beta. I have a classic form, with a listbox. This field is in autopostback=true. When I change the selected value, the page is...
13
by: ukrbend | last post by:
I'm new to Javascript and to html and am trying to make the following code snippet work but it doesn't. It refuses to call the getPage() function and I always get a 404 error. I know the code is...
1
by: Jim Satterfield | last post by:
I've looked and looked and can't find any solution or even mention of this problem so I'll see if I can find anyone through this group who might have an idea. I've inherited the job of webmaster...
2
by: Jon | last post by:
All, I'm currently working with a PHP-based CMS application, and am begining to put the finishing touches on it via Javascript validation. Currently, I'm using fairly standard methods of...
0
by: Ben Fidge | last post by:
Hi I've got a situation where I need to direct a Response.Redirect to a new window from within a page embedded within an IFrame. Currently, we have a page embedded within an IFrame that...
3
by: sylver | last post by:
Hi to all, I found out the you can use the scrollIntoView() method, to scroll an element (ie: a <divwith lots of content that it overflows) to its bottom / last line. But this only happens in...
0
by: johnw182 | last post by:
Ok, I have a asp.net project. Everything works great. HOWEVER, this project was made to be called from within a frame or iframe. When being used within the iframe the user gets a blank frame when...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.