Create Quick Launch Headers Without Hyperlinks in Sharepoint

Perhaps one of the most confusing things for Sharepoint newbies is adding headings to the quick launch bar but end up being forced to provide a URL for the heading. You may not necessarily want the heading to point anywhere but to just be a heading. However, there is a simple fix for this problem.

You can’t get out of providing a URL when creating the heading so you just need to put in the following JavaScript snippet to get past it:


You might wonder what happens when a user clicks on the heading – to answer that simply, nothing from a navigation perspective.


Skip to comment form

    • Jeff on October 30, 2013 at 06:08
    • Reply

    I’ve tried this a few different times. Every time I do, I get an error:

    An unexpected error has occurred.

    Troubleshoot issues with Microsoft SharePoint Foundation.

    Correlation ID: 6a7c519c-2925-b0eb-e894-f1a147cf1a4f

    Date and Time: 10/29/2013 7:03:54 PM

    Please let me know what I’m doing wrong.

    1. Bit hard to tell from that error as it doesn’t give much indication as to what went wrong without having a look in the logs.

        • Jeff on November 5, 2013 at 07:01
        • Reply

        Can you give any further explanation? I’ve tried this a few different way and it doesn’t seem to work for me.

        I’m working in SharePoint 2013. An admin enabled SharePoint Server Publishing Feature. Give me a link called, “Navigation” in Site Settings instead of the standard Quick Launch. It still won’t accept the above JavaScript as a valid url.


        1. Okay, I might have to stand up a SharePoint 2013 instance to double check but if you’re still having issues just try putting in “#” without the quotations as the URL and see if that works.

            • oliver on November 29, 2014 at 06:17

            I got the same message error, i try several ways to get this on the “Type the Web address:” textbox, i try:
            even with the “http://” at first but i get the same error than jeff mention on sharepoint 2013, the only solution i found is only put “#” or “/” and that redirecto to the main page but is not the solution we are searching.

    • Kathy on March 6, 2015 at 04:39
    • Reply

    Tried to enter in “javascript:window.goback(0) in the URL field. I am doing this via Site Settings/Navigation/Navigation Editing and Sorting. Is this the wrong place? I am getting the error: “Ensure that the URL is valid and begins with either a valid character (a number sign (#) or forward slash (/)) or a valid supported protocol (for example, http://, file://, ftp://, mailto:, news:).” What am I doing wrong?

    1. You’re not doing anything wrong – it is just how SharePoint 2013 behaves.

      I’ve not yet found a functional workaround without making the URL invalid.

Leave a Reply

Your email address will not be published.