I'm new here ... I hope that I'm doing everything right ;-D
I found several topics with similar problems, but they are not like they want to achieve what I want to achieve.
I have a website with a long content area, the website has scrollbars. Somewhere inside this content area is an iframe . This iframe implements the site at full height (support panel) and resizes the iframe when the contents of the height change, so the iframe does not have scroll bars. Now I want: when I open the site, i.e. http://www.mywebsite.com/#new , I want the page to scroll down to the iframe , but not only the beginning of the iframe, but the position where the anchor is placed inside this iframe .
Therefore, the iframe itself does not need to scroll (it is always 100% height), but the parent frame must be scrolled to the position where, inside the iframe , the anchor is placed.
I really don't know how to solve this. Adding an anchor to the iframe URL does not help, and just adding an anchor to the website URL does not work. I'm sure I need to implement something with javascript or similar, but donβt know how to do it! I can change the code of both - the website inside the iframe and the parent site!
// EDIT
Oh, I forgot ... I cannot do this using the onClick-Action attribute or the link (that the seams will be the solution in the linked post), because it is not a jump inside the same page. The page reloads and should go to the anchor: -D So this should work when I enter the URL myself ...
I hope you understand what I need!
// EDIT2 Possible scope:
- The main page is a Wordpress blog, so jQuery is possible!
- Iframe page - Simple Machine Forum ( SMF ) - I think only native JS is here!
source share