Navigation Problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rose Girl

    Navigation Problem

    Hi,

    This may be a simple problem, but i need some help on this.

    When i load a new page, i want it to automatically navigate to a specific
    position in the page. (like a hyperlink to a heading in the page)

    How can i do this.

    Thanks for your help
    Rose Girl
  • pcx99

    #2
    Re: Navigation Problem

    Rose Girl wrote:
    [color=blue]
    > Hi,
    >
    > This may be a simple problem, but i need some help on this.
    >
    > When i load a new page, i want it to automatically navigate to a specific
    > position in the page. (like a hyperlink to a heading in the page)
    >
    > How can i do this.
    >
    > Thanks for your help
    > Rose Girl[/color]


    window.scrollto (x,y);

    window.scrollto (0,0) will scroll to the top.

    window.scrollto (0,1000) will scroll 1,000 pixels down.

    To scroll to a specific element you'll need to calculate the position of
    that element. There's a prettygood script here:


    A much SIMPLER way to do this is to simply use the <A NAME="marker"></A>
    tag and then at the bottom of your document put...

    window.location .href="pagename .html#marker" where pagename.html is the
    name of your page and #marker is the name of your name tag.

    Good luck!

    -------------
    http://www.hunlock.com -- DHTML for the rest of us.

    Comment

    Working...