Using Anchor Tag in SharePoint Global and Current Navigation

I have a site page set up for News articles within our company that get created every month. We are using the current navigation as sort of a list with the corresponding months that the articles were created. So for instance
Jan
Feb
March
April
and so on
What needs to happen is that when a user selects the month, it will scroll down to the #anchor which corresponds to the month.
When entering the url (http://contoso.com/default.aspx#March) into the current navigation, and hitting ok. The main link remains (http://contoso.com/default.aspx)
without the anchor tag being kept. Any Ideas?
Thanks, Danny Hickman IT Support Specialist

For a start, try adding a content editor webpart to the page where you want the navigation change.
Edit the webpart and under source editor, copy paste the code below using script tags.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">
<script>
$(document).ready(function(){
$anchorResults = $('a').filter(function() {
var txt = $(this).text();
return (txt.length > 1 && txt[0] == '#');
$.each($anchorResults, function (index, value) {
var txt = $(value).text().substring(1);
var href = $(value).attr('href') + '#' + txt.replace(/ /g, '');
$(value).text( txt );
$(value).attr('href', href);
</script>
Let me know how it works out!
Thanks, Ransher Singh, MCP, MCTS | Click Vote As Helpful if you think that post is helpful in responding your question click Mark As Answer, if you think that this is your answer for your question.

Similar Messages

  • Parent (Global) and Current (Navigation) on the Same Page

    Hello,
    I am using the managed metadata feature in a SharePoint 2013 publishing site.  I am trying to layout my navigation as shown in the diagram below.  I can not find a publishing master page that implements this parent child relationship.  My
    top navigation is use the markup:
    <PublishingNavigation:PortalSiteMapDataSource ID="topSiteMap" runat="server" EnableViewState="false" SiteMapProvider="GlobalNavigationSwitchableProvider" StartFromCurrentNode="false" StartingNodeOffset="0"
    ShowStartingNode="false" TrimNonCurrentTypes="Heading"/>
    <SharePoint:AspMenu ID="TopNavigationMenu" runat="server" EnableViewState="false" DataSourceID="topSiteMap" AccessKey="&lt;%$Resources:wss,navigation_accesskey%&gt;"
    UseSimpleRendering="true" UseSeparateCss="false" Orientation="Horizontal" StaticDisplayLevels="1" AdjustForShowStartingNode="true" MaximumDynamicDisplayLevels="1" SkipLinkText=""/>
    I have tried using the same markup, using a different StartingNodeOffset and SiteMapProviders, for the side menu with no success.
    Thanks,
    Bob

    Hi,
    According to your post, my understanding is that you wanted to create Parent (Global) and Current (Navigation) on the Same Page.
    You can make quicklaunch work contextually like structural nav quicklaunch using Managed Metadata navigation. Please refer to:
    Managed Metadata Navigation - How do you make quicklaunch work contextually like structural nav quicklaunch?
    In addition, you can used JQuery and CSS to achieve staticlevel left navigation in SharePoint 2013.
    Here is a similar thread for your reference:
    http://social.technet.microsoft.com/forums/sharepoint/en-US/54edc501-0594-49e3-86b2-40ecf72bc68e/show-2-level-hierarchy-in-managed-navigation-menucurrent-navigation-in-sharepoint-2013
    More information:
    Overview of managed navigation in SharePoint Server 2013
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Not able to open document using anchor tag in firefox

    Hello Friends,
    I would really need your help in solving this issue.My application is deployed in server machine.
    I'm accessing the application through fire fox. In my application, i have a link where i need to open a document on click of it.
    For this, i am using html anchor tag.
    Eg:
    Test
    where IP is the server machine address and dir is the shared directory.
    It works in IE but didn't work in fire fox. Please help me out on to fix it.
    Cheers,
    Cap

    Try out to open doc using following link, {color:#ff0000}*use 5 back slashes instead of 2*
    {color}Test Link
    once you done the code change, close the browser and open a new browser and try it.
    Edited by: Thagelapally on Jul 17, 2009 6:05 AM

  • Anchor tag error, also copy and pasting text comes up "null"

    After the recent update I am receiving anchor tag errors telling me to start with an alphabetic letter, which I was. Also no longer lets me copy and paste text onto a page, instead it says "null". Any ideas on a fix ?

    I don't see a closing </body> tag in your code.  There's an opening tag, but no closing tag, hence unbalanced.
    ^_^

  • Using CDATA tags in XML program and parsing to J2ME

    Hi,
    Can anybody tell me how to use CDATA tag in a xml file and parse it to my J2ME code. is there any sample code available for this? I want to use this CDATA tag for sending Binary data. plzzzzzzz Help....!

    I think what you want is to parse a CDATA text from a xml file and let this text to execute.
    Very innovative idea!
    If I am right, I think you might mix some concept.
    Java code need to be changed to ByteCode before pased to the JVM. Furthermore, Java ME code must be verified before downloading to your machine.
    I figure that your attempt is impossible.

  • Use JSTL tags for ATG droplets and beans

    Hi,
    I am trying to display profile values in a JSON object in jsp.
    <dsp:getvalueof var="json" bean="ProfileFormHandler.ProfileJSON"></dsp:getvalueof>
    <c:out value="${json}" />
    but instead of using dsp tag is there a way for accessing ProfileFormHandler using JSTL tag
    Also how can we use droplets in ATG like ForEach using JSTL tags only
    <dsp:droplet name="ForEach">
    <dsp:param name="array" param="catalogItems.rootCategories"/>
    <dsp:param name="elementName" value="categoryItem"/>

    I am trying to display profile values in a JSON object in jsp.
    <dsp:getvalueof var="json" bean="ProfileFormHandler.ProfileJSON"></dsp:getvalueof>
    <c:out value="${json}" />
    but instead of using dsp tag is there a way for accessing ProfileFormHandler using JSTL tagIn the <dsp:importbean> use var to give an EL variable name to the component you are importing.You can also set its scope attribute to page, request, session, or application with page scope being the default. You can then access it as a page scoped attribute. So this should do:
    <dsp:importbean var="profileFormHandler" bean="/atg/userprofiling/ProfileFormHandler" />
    <c:out value="${pageScope.profileFormHandler.ProfileJSON}" />In case you change the scope in importbean you can accordingly use pageScope, requestScope, sessionScope or applicationScope.
    Also how can we use droplets in ATG like ForEach using JSTL tags only
    <dsp:droplet name="ForEach">
    <dsp:param name="array" param="catalogItems.rootCategories"/>
    <dsp:param name="elementName" value="categoryItem"/>Any ATG droplet is nothing but a servlet which is also a Nucleus component. So essentially you want to call a servlet from JSTL which as such shouldn't be done in a well written script-less JSP. You can probably try to use the droplet as a bean and use JSTL on top of it but since ATG droplets also have different types of parameters like input, output and open so you will have to specially handle those.

  • How to use anchor tag in JSFF fragment inside a BTF?

    Hi,
    I have a JSFF fragment as a default activity of my BTF. In this JSFF i have to create a anchor tag that will have a Link to my JSP from where i have to redirect to some other application. The JSP is in my code base. I have put an anchor tag and have linked this to my JSP page present in my code base. When i would run my application and click on this anchor link that i can see on my region thus created, a new window(as desired would open) and
    HTTP 404 would come to me.
    I don't know how to make this link working. Please help.
    Does this have a relation with BTF flow?
    Edited by: Avi on Dec 6, 2012 8:03 AM

    Hi Shay,
    I just gave My Data . The JSP resides in parallel with my JSFF fragments. But still i don't know why this behavior is coming to me.

  • RFC used to query customer credit limit and current usage

    Hi,
    I have been asked to provide information about a customers credit limit and usage. I can see this information is in table KNKK but I cant find any suitable RFC (needs to be remotely enabled) to access this data.
    Does anyone know where I can access this data?
    Cheers, Paul

    Have you checked fm
    CREDITCONTROL_READ_KNKK
    Its normal fm may be you can write wrapper above this and make it as RFC

  • SharePoint MySite and MainSite - Navigation connection

    Hi,
    So we've followed the best practice on creating a separate web application for MySite...the user profiles.
    How do i get the navigation pages to reference the Main site?
    Ex:  if I'm looking at my profile the navigation (newsfeed, OneDrive, Sites) all reference the MySite...I want it to Navigate to the Main site and show the Navigation pane on the left of the main site on the Profile page.
    Does that make sense?
    Larry
    Thanks! Larry

    Hi LarryC,
    What is the Main site? Whether it is a site that you are following.
    In SharePoint Server 2013, a My Site is a personal site for individual users in an organization. Although an organization can customize My Sites, by default the top of every page displays tabs for:
    • Newsfeed
    • OneDrive
    • Sites
    Newsfeed is the user’s social hub where he or she can see updates from the people, documents, sites, and tags that the user is following.
    The OneDrive tab links to the user’s OneDrive for Business. OneDrive for Business is the user’s personal file storage and synchronization service for business use.
    The Sites tab lists the sites that the user is following and suggested sites that the user might find interesting. The user can use this to easily keep track of the sites he or she is most interested in.
    More information, please refer to the links:
    http://technet.microsoft.com/en-us/library/ff382643(v=office.15).aspx
    http://sp2013.blogspot.in/2012/07/mysite.html
    If I misunderstand your meaning, please provide more information or some screenshots for your issue. It will mark others in the fourm easy to find a solution for you.
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • How to open a doc file using jsp Anchor tag

    when i am trying to open a doc file using a jsp it is opening with out proper alignment.
              how to open a doc file with proper alignment using Anchor Tag in JSp Page
              

    Hello!
    Does some one of you had open a MS word file (.doc) in Java search for a token like [aToken] replace it with another text and then feed it to a stream of save it?
    I want to build a servlet to open a well formatted and rich on media (images) ms word document search for tokens and replace them with information form a web form.
    Any Ideas?
    Thank you in advanced.

  • File Download not working for anchor tags

    Hello,
    I've encountered a bug with the 4.1.31 version of Tomcat. Apparently, when
    I use an anchor tag for a file, and I click on the link, it does not show the
    file download message "Do you want to open or save this file?" with the open
    and save options. Instead, it displays the file in the browser. I know you
    could normally save this information from the browser to a file, but I need it
    to show the download message because it's easier for users to save their
    file. I'm using Internet Explorer version 6, SP2. I've also tried setting
    the "Confirm open after download" check box for file types to no avail. It
    use to work in Tomcat 4.1.18.
    Any help would be appreciated.

    Can anyone pls. help me ? I tried all options from disbling firewall to uninstalling Bonjour.. But nothing works. Had I known that Apple makes such worst software I would never have bought iPhone !!!! Apple really *****!!!!!!!

  • Best practice for using anchor labels?

    I am looking into using anchor labels for the first time and
    I am thinking I cant use them for this site because I am using xml
    and other variables that are being passed in on the first frame but
    maybe there as a chance that it still works. So I would like to
    know the best ways to use anchor labels. Someone who has used them
    please let me know.
    Thanks,
    Randy

    I've used anchor tags in Dreamweaver a lot, but never in
    Flash

  • Anchor tag in txt file

    is there any way that i could include a link that has
    punctuation characters inside of an anchor tag of an externally
    loaded txt file. something like this <a href='
    http://www.dailymotion.com/relevance/search/leah%2Bdizon/video/x18dj1_leah-dizon'>click</a >.
    i noticed that txt files loaded into flash seem to break at any
    point where more unusual punctuation characters are
    included.

    This is such a great solution--thanks so much for sharing.  I'm having a problem with the name of my collapsible panels (which operate similarly to Tabbed Panels, as far as I understand).  Basically I am trying to use anchor tags and my goal is to create a hyperlink on page 1 that points to content within a spry widget on page 2 of my webpage.  I obviously want the spry widget on page 2 to open up on click and the user to be taken to where my anchor tag is located.  In this thread (http://forums.adobe.com/message/209107#209107), Mr. Celic seems to indicate using something like this:
    <a href="#anchorname" onclick="TabbedPanels1.showPanel(2);">
    My exact code is like this:     <a href="pagetwo.html#myanchortag" onclick="CollapsiblePanel1.open();">content here</a>
    The good news is that this works, but my problem is that page 1 of my website also has a CollapsiblePanel1 so when I click on the link above, CollapsiblePanel1 on page 1 opens, not the CollapsiblePanel1 on page 2 of my site.  I went into page 2 and clicked on "CollapsiblePanel1" and in the "Properties" panel renamed it to "CollapsiblePanel11" then changed my code to
    <a href="pagetwo.html#myanchortag" onclick="CollapsiblePanel11.open();">content here</a>
    but that didn't do a thing!  I'm super stuck and don't know how else to rename the collapsible panels or how to get it to work.
    One thing I can't figure out from the original solution (<a href="#" onclick="TabbedPanels1.showPanel(2);">) is what is "showPanel(2)"? Where did she get this from/where can I find the equivalent for my collapsible panel spry? This could be where I'm going wrong.
    Any thoughts would be greatly appreciated.
    Thanks so much! Catherine

  • Anchor Tag In Tabbed Panel Content

    I used this code to jump to and open the tab. I would like to
    add an anchor tag name to it so that it jumps to a specific section
    I have named in the content panel.
    <a href="#" onclick="TabbedPanels1.showPanel(2); return
    false;">
    This solution does not work:
    <a href="#anchorname" onclick="TabbedPanels1.showPanel(2);
    return false;">
    Has anyone found a work around for this?

    This is such a great solution--thanks so much for sharing.  I'm having a problem with the name of my collapsible panels (which operate similarly to Tabbed Panels, as far as I understand).  Basically I am trying to use anchor tags and my goal is to create a hyperlink on page 1 that points to content within a spry widget on page 2 of my webpage.  I obviously want the spry widget on page 2 to open up on click and the user to be taken to where my anchor tag is located.  In this thread (http://forums.adobe.com/message/209107#209107), Mr. Celic seems to indicate using something like this:
    <a href="#anchorname" onclick="TabbedPanels1.showPanel(2);">
    My exact code is like this:     <a href="pagetwo.html#myanchortag" onclick="CollapsiblePanel1.open();">content here</a>
    The good news is that this works, but my problem is that page 1 of my website also has a CollapsiblePanel1 so when I click on the link above, CollapsiblePanel1 on page 1 opens, not the CollapsiblePanel1 on page 2 of my site.  I went into page 2 and clicked on "CollapsiblePanel1" and in the "Properties" panel renamed it to "CollapsiblePanel11" then changed my code to
    <a href="pagetwo.html#myanchortag" onclick="CollapsiblePanel11.open();">content here</a>
    but that didn't do a thing!  I'm super stuck and don't know how else to rename the collapsible panels or how to get it to work.
    One thing I can't figure out from the original solution (<a href="#" onclick="TabbedPanels1.showPanel(2);">) is what is "showPanel(2)"? Where did she get this from/where can I find the equivalent for my collapsible panel spry? This could be where I'm going wrong.
    Any thoughts would be greatly appreciated.
    Thanks so much! Catherine

  • How to use framework tag libraries

    i need to create a new masthead using framework tag libraries.i got the purpose of  that tag libraries from the help.sap.com site.
    but i want some sample codes for the usage of that tags.i already have a masthead code using navigation tag libraries.can i make changes in that by using framework tags.if yes how and where to change.
    or if u have any new solutions also please tell me.
    if anyone has idea about it please share.
    regards,
    karthick

    yes Mr.michael i checked with the help.sap.com site.but i cant get any sample code or solution.they have given the available tags and function of them in one line.no other details.
    what u have given is a sample code for navigation tag libraries.i have it already.now i need a sample code with framework tag libraries.both have different functionalities i think so.if u find anything please send it.
    thanks for ur reply.
    regards,
    karthick

Maybe you are looking for

  • Identify Ports for AD - External UDP port scanner

    Greetings all, I am trying to figure out which UDP port is alarming on the "AD - External UDP port scanners (13005)" signature. By default, the signature is set to summarize which looks something like this "NumDestIps=100; currentTHreshold=100. proto

  • Reports in MSS ERP2005

    Hi All, We have the latest EP and MSS patches. I am trying to work out - How to configure the MSS Launchpad - How to get it to point to a standard HR report Absence Calendar View by Employee RPTABS50 The documentation is not much help and doesn't rea

  • Photos app will not install

    All of my apps installed except for the new Photos app. Getting error code 0x80240024 in the new beta store.

  • I can't install Lightroom from CC subscription

    Hello, I can't install Lightroom from Adobe CC Following 30 days of test with an evaluation version, I have subscribed to a pack CC+Lightroom; all is OK with CC, the evaluation version has been replaced by the subscribed one. But on Lightroom side it

  • Imac Running Slow in Mountain Lion Solution

    a week afterupgrading my imac, it was still running painfully slow, especally after it had been left on overnight. i tried fixing permissions, deleting fonts, (my os is the only thing on a 500GB drive so space wasnt an option) my solution which thus