473,387 Members | 1,553 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,387 software developers and data experts.

Iframe scroll to anchor problem.

Hello,
I have the following problem:

An Iframe exists inside a page (that has content exceeding the height,
therefore scrollbars kick in) - normal stuff.

When I want to use anchor references inside the Iframe the parent
page is affected also, in that it jumps to the top of the iframe, as though
there were an anchor at that point.

HELP !!

PS: This happens in IE, but is fine in NS.

Splishman
Jul 20 '05 #1
2 16516
DU
splish wrote:
Hello,
I have the following problem:

An Iframe exists inside a page (that has content exceeding the height,
therefore scrollbars kick in) - normal stuff.

When I want to use anchor references inside the Iframe the parent
page is affected also, in that it jumps to the top of the iframe, as though
there were an anchor at that point.

HELP !!

PS: This happens in IE, but is fine in NS.

Splishman


Give id to your anchors and use the scrollIntoView() method.

frames["FrameName"].document.getElementById("idAnchor").scrollIntoVie w(true);

will work in MSIE 6 for Windows, NS 7.1 and Mozilla-based browsers.

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html

Jul 20 '05 #2
Thanks for the effort DU but it hasn't changed things for me.
It is producing the same effect as just linking to the anchor.
The parent page JUMPS to the top of the IFRAME instead of
just leaving itself in its current position.

Splishman
"DU" <dr*******@hotREMOVEmail.com> wrote in message
news:bg**********@news.eusc.inter.net...
splish wrote:
Hello,
I have the following problem:

An Iframe exists inside a page (that has content exceeding the height,
therefore scrollbars kick in) - normal stuff.

When I want to use anchor references inside the Iframe the parent
page is affected also, in that it jumps to the top of the iframe, as though there were an anchor at that point.

HELP !!

PS: This happens in IE, but is fine in NS.

Splishman
Give id to your anchors and use the scrollIntoView() method.

frames["FrameName"].document.getElementById("idAnchor").scrollIntoVie w(true)
;
will work in MSIE 6 for Windows, NS 7.1 and Mozilla-based browsers.

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Andres Mas Torrecillas | last post by:
Hi! I'm having a little trouble with an IFRAME added in an HTML page. IFRAME has a fixed size and it contains another HTML page, which only has some text paragraphs and a pair of images aligned...
2
by: David | last post by:
How do you turn an iframe scrollbar off, from within javascript, after the iframe has been loaded? In my example, the page with the iframe on it is initially set to scrolling=yes, however, I want...
6
by: gsb | last post by:
Don't know if this is the right place to post this JavaScript issue. If not, could someone point me in the right direction please. I am trying to make a "cross browser compliant" floating...
2
by: knkk | last post by:
I have an iframe in a page (with a name to the iframe), and in that iframe I have several anchors <a name="something"> There are links in the iframe that look like <a href="#something"> ...
0
by: LudwigWrules | last post by:
I have an iframe on my site. I need the frame to display its "child" page at a specific point. I can do this by setting an anchor, but it makes the parent window go there, too. I was thinking of just...
0
by: tequilamala | last post by:
I have an Iframe in one of the pages i am developing... the iframe is suppose to scroll up and down and the links target the iframe. the problem is that the iframe scrolls side to side on internet...
1
by: John L. | last post by:
How do I invoke the scroll() method of a window object for a scrollable IFRAME element in an HTML document? I am using IE 7.0, and I thought the following would work: ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.