I am building a website currently that has:
A main page which has an iframe in it (the parent page). There is a menu on this page where the links are targeted to open in the iframe. The iframe has scrolling disabled and the iframe adjusts to fit the content of the child page.
My question is... is there a way to make the page scroll to the top (of the parent page) when a link is clicked instead of the parent page remaining scrolled half way down where the link originally was clicked on the previous child page.
I was thinking maybe something along the lines of "onClick". I have tried a few codes I've found online but none seem to work. I don't want this code to interfere with the code I currently have that resizes the iframe to fit the child page contents.
I'm pretty new to all this so please be patient.
iframe1 = one of the pages of my site. a list of linked images in the iframe. yellow text just letting u know where everything is.
iframe2 = this is what happens when the link is clicked. notice the page is scrolled down a bit.
iframe3 = this is how i want the page to load when a link is clicked. scrolled up to the top.