Jump to content

The Next Evolution Of The "maintain Page Position On Click" Question


Recommended Posts

Okay, “justsomeguy” got me out of the last jam. I’ve evolved my design to the next level and now my page positioning problem exists in another dimensionHere is the situation. I have a page with two iframes. Call this MainPage.html.One iframe of MainPage.html is populated by an html page with an activity diagram; call that page Diagram.html.The other iframe of MainPage.html is populated by an html page with a process document; call that page Process.html.In Diagram.html, the graphic box for step 4.1 is mapped (hotspotted) to the 4.1 heading in Process.html with the following code:

      <area shape="rect" coords="40,106,186,136" href="../../references/”Process.htm#_Toc177957071" target="process_iframe" alt="4.1" onclick="setTimeout('window.scrollTo(0,0);',10)" />

Note that the code includes the instruction for the window to scroll to the top after the click action is complete. The problem: When I run MainPage.html, the link from the 4.1 diagram box (in one iframe) to the 4.1 process heading (in the other iframe) does work, but the window that contains MainPage.html does not scroll to the top. I think this is because the window.scrollTo instruction is in the code for Diagram.html . . . Is there anything I can add to the code in Diagram.html – or a way to rewrite the code – that will cause the window containing MainPage.html to scroll to the top onclick?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...