News

Rebecca Isserman's Facebook profile

My Stats

  • Posts - 102
  • Comments - 118
  • Trackbacks - 0

Twitter












Tag Cloud


Recent Comments


Recent Posts


Archives


Post Categories


Blogs on SharePoint


Other Blogs


Resources on Sharepoint


Stuff



Here is some sample code:

while(document.getElementById('zz2_QuickLaunchMenu'+i) != null) 
{  
               var menu = document.getElementById('zz2_QuickLaunchMenu'+i); 
              //looks for the hyperlink tags using the quicklaunch tag 
               var hyperlinks = menu.getElementsByTagName('a');  
               hyperlinks[0].href = hyperlinks[0].href.replace(URL, URLToReplace);  //replaces the URL text 
               hyperlinks[0].target = "_blank";                            //allows for opening the link in a new window                
               i+=1;
 
}
This tag for the quicklaunch: zz2_QuickLaunchMenu you can find by right clicking on your list and looking for the quick launch menu.  It will probably include the name "QuickLaunchMenu" and some text in the same format as zz2_.  The code is pretty straightforward.  If you have any comments or questions let me know.  Have a very good weekend!

Re-posted from old blog.

Technorati Tags: ,,

posted @ Friday, February 22, 2008 5:00 PM | Filed Under [ MOSS Javascript ]

Comments

Gravatar # re: Replace URL's on the Quicklaunch in Javascript
Posted by Rob (Maidstone) on 8/7/2008 5:13 AM
Does this need to go into a content editor webpart on the page?
Gravatar # re: Replace URL's on the Quicklaunch in Javascript
Posted by MOSSLover on 8/8/2008 5:07 PM
You could put it in a web part or embed it in the page or add it to a content editor web part. It's really one of those pick your poison type of things.
Post a comment





 

Please add 7 and 8 and type the answer here: