Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. SharePoint
  4. On-page Anchor Points [solved]

On-page Anchor Points [solved]

Scheduled Pinned Locked Moved SharePoint
helphtmlsharepointcomtutorial
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JimmyRopes
    wrote on last edited by
    #1

    I am trying to put an on-page anchor point on a SharePoint (.aspx) page and get a syntax error. I have done this many times on html pages and even copied from an example on W3C to be sure I was doing it correctly. It worked in the "try it yourself" page on W3C but not on the .aspx page. I am doing this:

    I think only id is necessary but put in the name attribute to see if that would work.

    <a href="#jump_here">Jump to section of page.</a>

    I am getting a syntax error but do not see where I have coded it wrong. Does anyone use on page links on a SharePoint page? What can I do to make this work without generating an error? <edit> Turns out it was a problem with my browser. I noticed I was getting a syntax error on web pages from other sites. A reset of my group policy fixed the problem and all works well using the code shown above. </edit>

    The report of my death was an exaggeration - Mark Twain
    Simply Elegant Designs JimmyRopes Designs
    Think inside the box! ProActive Secure Systems
    I'm on-line therefore I am. JimmyRopes

    I 1 Reply Last reply
    0
    • J JimmyRopes

      I am trying to put an on-page anchor point on a SharePoint (.aspx) page and get a syntax error. I have done this many times on html pages and even copied from an example on W3C to be sure I was doing it correctly. It worked in the "try it yourself" page on W3C but not on the .aspx page. I am doing this:

      I think only id is necessary but put in the name attribute to see if that would work.

      <a href="#jump_here">Jump to section of page.</a>

      I am getting a syntax error but do not see where I have coded it wrong. Does anyone use on page links on a SharePoint page? What can I do to make this work without generating an error? <edit> Turns out it was a problem with my browser. I noticed I was getting a syntax error on web pages from other sites. A reset of my group policy fixed the problem and all works well using the code shown above. </edit>

      The report of my death was an exaggeration - Mark Twain
      Simply Elegant Designs JimmyRopes Designs
      Think inside the box! ProActive Secure Systems
      I'm on-line therefore I am. JimmyRopes

      I Offline
      I Offline
      Ingo
      wrote on last edited by
      #2

      JimmyRopes wrote:

      Does anyone use on page links on a SharePoint page? What can I do to make this work without generating an error?

      Standard-HTML anchors are broken in SharePoint. There are many solutions on google[^]. You can find two examples on http://yalla.itgroove.net/2012/05/anchor-links-tags-in-sharepoint-2010/[^]

      ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

      J 2 Replies Last reply
      0
      • I Ingo

        JimmyRopes wrote:

        Does anyone use on page links on a SharePoint page? What can I do to make this work without generating an error?

        Standard-HTML anchors are broken in SharePoint. There are many solutions on google[^]. You can find two examples on http://yalla.itgroove.net/2012/05/anchor-links-tags-in-sharepoint-2010/[^]

        ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

        J Offline
        J Offline
        JimmyRopes
        wrote on last edited by
        #3

        Thanks for the information.

        The report of my death was an exaggeration - Mark Twain
        Simply Elegant Designs JimmyRopes Designs
        Think inside the box! ProActive Secure Systems
        I'm on-line therefore I am. JimmyRopes

        1 Reply Last reply
        0
        • I Ingo

          JimmyRopes wrote:

          Does anyone use on page links on a SharePoint page? What can I do to make this work without generating an error?

          Standard-HTML anchors are broken in SharePoint. There are many solutions on google[^]. You can find two examples on http://yalla.itgroove.net/2012/05/anchor-links-tags-in-sharepoint-2010/[^]

          ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

          J Offline
          J Offline
          JimmyRopes
          wrote on last edited by
          #4

          Thanks for the information. I tried what the link said, but it didn't work. By making the href JavaScript:; and the on click event this.href the anchor point name the syntax error did not happen but the page did not position at the anchor point. I did Google before I posted the question here and all I came up with was what was causing the syntax error. It is odd because the same code executes fine in an HTML page. If you can think of any other SharePoint specific links please let me know.

          The report of my death was an exaggeration - Mark Twain
          Simply Elegant Designs JimmyRopes Designs
          Think inside the box! ProActive Secure Systems
          I'm on-line therefore I am. JimmyRopes

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups