Scroll parent frame to anchor in iframe

admin

Administrator
Staff member
I'm new here ... hope I'm doing everything right ;-D

I've found a few topics with similar problems but they do not look like they want to reach what I want to reach.

I've got a website with a long content area, the website has scrollbars. Somewhere inside this content area is an
Code:
iframe
. This
Code:
iframe
implements a site with full height (a support board) and resizes the
Code:
iframe
when the contents
Code:
height
is changing - so the
Code:
iframe
has no scrollbars. Now what I want is: when I'm opening the website with i.e.
Code:
http://www.mywebsite.com/#new
I want the page to scroll down to the
Code:
iframe
but not only the begining of the iframe but the position where the anchor is placed <strong>inside</strong> this
Code:
iframe
.

So the
Code:
iframe
itself doesn't need to be scrolled (it's always 100% height) but the parent frame should be scrolled to the position where - inside of the
Code:
iframe
- the anchor is placed.

I really don't know how to solve this. Adding the anchor to the iframes url doesn't help and also just adding the anchor to the website url doesn't work. I'm sure I have to implement something with javascript or similar but don't know how! I'm able to modify the code of both - the website inside the iframe and the parent site!

//EDIT<br>
Oh i forgot... I can't do it with an onClick-Action or a link attribute (that's what seams to be the solution in a related post) because it's not a jump inside the same page. The page is being reloaded and should jump to the anchor :-D So it has to work when I'm entering the URL on my own...<br>
Hope you understand what I need!

//EDIT2
Possible frameworks:

<ul>
<li>Main page is a wordpress blog, so <strong>JQuery</strong> is possible!</li>
<li>Iframe page is a simple machine forum (<a href="http://www.simplemachines.org/about/copyright.php" rel="nofollow" title="SMF">SMF</a>) - I think only native JS here!</li>
</ul>