Forum Moderators: open

Message Too Old, No Replies

Linking to anchors on pages embedded in <iframe></iframe>

         

Pjeter

2:13 pm on Jan 30, 2004 (gmt 0)



Hi!

I am a freshman here, so maybe I've missed something in previous discussions, but I tried to find an answer and I failed. The thing is that when I use links (located either inside or outside iframes) referring to anchors on a page embedded in the iframes, if the top page has vertical scrollbar too, it jumps as well (with IE6 at least). It is really annoying. Let's consider the following code:

1)*********

<html>
...
<body>
<iframe src="main.html" ......></iframe>
<br><br><br>.......<br>
</body>
</html>

2)(main.html)**********

<html>
...
<body>
<a href="#sat">SATURDAY</a>
<br><br><br>.......<br>
<a name="sat"></a>
....
</body>
</html>

How can I prevent the top page (1) from scrolling while clicking "SATURDAY" on the inner page (2) if both pages are rather long and require vertical scrollbars by themselves?

Thank you in advance!

TryAgain

9:34 pm on Jan 30, 2004 (gmt 0)

10+ Year Member



Don't know if this will be of any help but you might try things like:

<iframe src="..." scrolling="no">

or:

<style>
html, body {overflow: hidden;}
</style>