SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    OnLoad > Bookmark ?!

    How can i go to spec. bookmark when page is loaded ?!

  2. #2
    SitePoint Addict WarpNacelle's Avatar
    Join Date
    Aug 2005
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The page with the link must read:

    HTML Code:
    <a href="nextpage.html#section1">
    Then then "nextpage.html" must have the named anchor in the appropriate spot:

    HTML Code:
    <a name="section1">
    You can have as many named anchors through out the page as you need.

    Just point the links to the correct name.

    If you want to jump to a place in the same page, make your link:

    HTML Code:
    <a href="#section1">


  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by WarpNacelle
    The page with the link must read:

    HTML Code:
    <a href="nextpage.html#section1">
    Then then "nextpage.html" must have the named anchor in the appropriate spot:

    HTML Code:
    <a name="section1">
    You can have as many named anchors through out the page as you need.

    Just point the links to the correct name.

    If you want to jump to a place in the same page, make your link:

    HTML Code:
    <a href="#section1">

    No! You don't understand me... I want to go automati. to #section1 when page is loaded without of clicking to any link...

  4. #4
    SitePoint Addict WarpNacelle's Avatar
    Join Date
    Aug 2005
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I guess I don't understand the purpose behind that.

    How else would someone get to a page without clicking a link, other then typing in the address directly into the browser?

    Either way, pure HTML would have to have a direction on where to go in the link, so it may sound like you're looking for a JavaScript function.

    If that's the case, I would suggest posting to that forum for suggestions.


  5. #5
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Code:
    <body onload="location.hash='myPlace';">
    ....
    <div id="myPlace">
    My place.
    </div>
    </body>

  6. #6
    SitePoint Addict WarpNacelle's Avatar
    Join Date
    Aug 2005
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There ya go! JavaScript saves the day again.


  7. #7
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vgarcia
    Code:
    <body onload="location.hash='myPlace';">
    ....
    <div id="myPlace">
    My place.
    </div>
    </body>
    Thanks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •