Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Jump to specific place on page

  1. #1
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default Jump to specific place on page

    I would like to ask how to correctly code the text below so i can jump to an id on the same page.

    Please go here, http://www.theremotedoctor.co.uk/basic.html
    Select Accessories then Audi.
    This is where on the ipad after selecting Audi i require the page to jump to the named id "topnav"
    Here is the line of code <li><a href="accaudi.html">Audi</a></li> but not sure how to go about it as the href is already in use.

    Please advise then i can edit all the others to match.

    Thanks
    Last edited by theremotedr; 04-26-2015 at 06:13 AM.

  2. #2
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    If you mean moving within a page you simply use the id name preceded by the "#" symbol. Like this:

    <li><a href="#topnav">Audi</a></li>


    If you are coming from another page you need to use the page reference as well:

    <li><a href="accaudi.html#topnav">Audi</a></li>

  3. The Following User Says Thank You to styxlawyer For This Useful Post:

    theremotedr (05-17-2015)

  4. #3
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    Hi,
    Ive understood that and used it BUT i need to do this.
    When on the ipad...
    Select accessories then drop down list select Audi.
    At this point the listings for Audi are down the page a little to far.
    I thought that after selecting Audi the page could jump to the id "topnav" then the listings are all visable ?

    And yes its on the same page just trying to get a better view of the listings after selecting the Audi.

  5. #4
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    At the same time Audi is selected not only do i require the listings to be shown on page "which is currently all ok" but i need the page to jump to id "topnav"

  6. #5
    Join Date
    Dec 2008
    Location
    Selby, North Yorkshire
    Posts
    90
    Thanks
    28
    Thanked 2 Times in 2 Posts

    Default

    I'm not sure the problem is with the code. Do your clients need a logo and instructions? If you ditch the graphics will it still work?

  7. The Following User Says Thank You to BorderTerroir For This Useful Post:

    theremotedr (05-17-2015)

  8. #6
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    I would like the logos etc still to be in place.
    I have seen something in the week which allowed this but cant find it now.
    Cant the word Audi be kind of hyperlinked to where i need it to go ?
    Grabbing at straws as i cant find where i read about it.

  9. #7
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    I have edited the code to this
    <li><a href="accaudi.html"><a href="#topnav">Audi</a></a></li>
    Which sends the page to the id i require but its created another field on the page ?

  10. #8
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    Quote Originally Posted by theremotedr View Post
    I have edited the code to this
    <li><a href="accaudi.html"><a href="#topnav">Audi</a></a></li>
    Which sends the page to the id i require but its created another field on the page ?
    HTML strictly forbids nested <a>..</a> elements so browser behaviour will be undefined for your construct.

    Edited to add link.

    See here.

    Last edited by styxlawyer; 04-18-2015 at 08:56 AM.

  11. #9
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    I have since put the code back as it was,still looking for a way to get this small request functional.

  12. #10
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    Quote Originally Posted by theremotedr View Post
    I have since put the code back as it was,still looking for a way to get this small request functional.
    Did you try:

    <li><a href="accaudi.html#topnav">Audi</a></li>

Similar Threads

  1. Resolved Javascript Page Jump
    By joetank0 in forum JavaScript
    Replies: 1
    Last Post: 02-03-2009, 08:24 PM
  2. Open album page jump at top of page
    By breagan1 in forum Dynamic Drive scripts help
    Replies: 5
    Last Post: 12-25-2008, 06:11 AM
  3. Step Carousel Viewer - Jump to specific slide
    By bento in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 11-06-2008, 09:46 AM
  4. Navigation Jump To Page?
    By Markxxx in forum Looking for such a script or service
    Replies: 0
    Last Post: 03-20-2008, 10:21 PM
  5. Two jump menus, one page
    By marynorn in forum JavaScript
    Replies: 1
    Last Post: 12-11-2007, 01:28 PM

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
  •