tag:blogger.com,1999:blog-8705297068966115777.post8594047749632792583..comments2023-07-03T13:51:23.493+05:30Comments on SharePoint Kings: Remove link on Lookup FieldParth Patelhttp://www.blogger.com/profile/05132175585607358084noreply@blogger.comBlogger34125tag:blogger.com,1999:blog-8705297068966115777.post-73028701110869239182012-11-08T20:32:28.042+05:302012-11-08T20:32:28.042+05:30THANK YOU!!!!!!!!!!!!!THANK YOU!!!!!!!!!!!!!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-79460702320938443442012-03-08T22:56:42.584+05:302012-03-08T22:56:42.584+05:30Walter,
what exactly you are looking for?Walter,<br /><br />what exactly you are looking for?SharePoint Kingshttps://www.blogger.com/profile/08472838332009399790noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-25908880831092126882012-03-08T22:56:05.141+05:302012-03-08T22:56:05.141+05:30Tracey,
to get group by refer this link http://ww...Tracey,<br /><br />to get group by refer this link <a href="http://www.sharepointkings.com/2011/05/how-to-get-group-by-html-in-sharepoint.html" rel="nofollow">http://www.sharepointkings.com/2011/05/how-to-get-group-by-html-in-sharepoint.html</a>SharePoint Kingshttps://www.blogger.com/profile/08472838332009399790noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-49018060984990209222012-01-24T03:26:07.030+05:302012-01-24T03:26:07.030+05:30How would we modify the script so that the links f...How would we modify the script so that the links for selected column are removed, yet leaves other columns with the OOTB behavior?Walterhttps://www.blogger.com/profile/13217746541152279873noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-53331394663216367972012-01-23T21:42:38.267+05:302012-01-23T21:42:38.267+05:30Is there a way to get this working in a grouped li...Is there a way to get this working in a grouped list view?Traceyhttps://www.blogger.com/profile/14024684321173119883noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-90226067868124132462012-01-01T15:40:57.170+05:302012-01-01T15:40:57.170+05:30@Unknown,
yes you can change that a(anchor) tag...@Unknown,<br /><br />yes you can change that a(anchor) tag by adding attribute target='_blank' which will open link in new window.SharePoint Kingshttps://www.blogger.com/profile/08472838332009399790noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-14631156325902688962011-12-13T20:14:44.017+05:302011-12-13T20:14:44.017+05:30Hey your code is awesome and I appriciate that. Bu...Hey your code is awesome and I appriciate that. But instead of removing link i want to open that all link in to different window rather to navigate that in to page...I want to open in to different opo up window do you know how can i do thatManan Choksihttps://www.blogger.com/profile/12932838763791574780noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-23244439903704466382011-12-08T19:58:43.633+05:302011-12-08T19:58:43.633+05:30This is great, I've been looking for a solutio...This is great, I've been looking for a solution to this for ages. Thanks very much.General_Mayhemnoreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-72354238377942487922011-10-31T15:07:05.310+05:302011-10-31T15:07:05.310+05:30@Anonymous October 27, 2011 5:27 AM. Very nice, th...@Anonymous October 27, 2011 5:27 AM. Very nice, that's a really elegant solution. I'll be using that from now on.Aquila Sandshttps://www.blogger.com/profile/03711319021585502986noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-61499272932894615312011-10-27T05:27:55.504+05:302011-10-27T05:27:55.504+05:30You should be able to use this function that I jus...You should be able to use this function that I just created and tested:<br />removeLookupLinks=function(){<br /> var a=document.getElementsByTagName('A'),o;<br /> for(var i=a.length-1;i>=0;i--){o=a[i];<br /> if(o.href&&o.href.indexOf('RootFolder=*')!=-1)o.removeNode()<br /> }<br />};<br /><br />It basically iterates in reverse to avoid DOM node removal exceptions. The 'removeNode([false])' method removes the <a> tag without removing the text node within it ('true' would remove it).Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-37677263894543318552011-10-07T19:57:22.935+05:302011-10-07T19:57:22.935+05:30yes if you have thousands of data, which is unlike...yes if you have thousands of data, which is unlikely because in that case SharePoint itself will be slow,<br />but yes for lot of data it will be a little performance hit. <br /><br />this script if fire @ client side so not much impact as wellSharePoint Kingshttps://www.blogger.com/profile/08472838332009399790noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-76882464303267042132011-10-07T19:00:04.579+05:302011-10-07T19:00:04.579+05:30Thanks for marvelous solution. Work like charm, bu...Thanks for marvelous solution. Work like charm, but I have a question though, wouldn't it be some hit on performance, looping so many elements.?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-18024133627785393052011-06-21T19:15:51.776+05:302011-06-21T19:15:51.776+05:30Aquila Sands,
Thanks a lot, this helps a lot.Aquila Sands,<br /><br />Thanks a lot, this helps a lot.SharePoint Kingshttps://www.blogger.com/profile/08472838332009399790noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-30126205107031043932011-06-21T17:49:53.550+05:302011-06-21T17:49:53.550+05:30An alternative way to remove the links that won...An alternative way to remove the links that won't break multi value lookup fields and doesn't require regex.<br /><br />_spBodyOnLoadFunctionNames.push("RemoveLookupLinks");<br />function RemoveLookupLinks() {<br /> var links = document.getElementsByTagName('a');<br /> var flag = false<br /> var elem = document.createElement("span");<br /> for(var i=0;i<links.length;i++) {<br /> if(links[i].attributes["href"].value.indexOf("RootFolder=*")!= -1) {<br /> var linkvalue = links[i].innerHTML;<br /> elem.innerHTML = linkvalue;<br /> links[i].parentNode.replaceChild(elem, links[i]);<br /> flag = true;<br /> break;<br /> }<br /> }<br /> if(flag)<br /> RemoveLookupLinks();<br />}Aquila Sandshttps://www.blogger.com/profile/03711319021585502986noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-62600003982047966422010-10-11T15:02:53.056+05:302010-10-11T15:02:53.056+05:30Le Sman,
it will remove all the link as it was co...Le Sman,<br /><br />it will remove all the link as it was coded.<br /><br />so no idea regarding your requirementSharePoint Kingshttps://www.blogger.com/profile/08472838332009399790noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-52558391041269890352010-09-09T14:24:06.508+05:302010-09-09T14:24:06.508+05:30hi King, thanks for your code. It worked tho' ...hi King, thanks for your code. It worked tho' still got a lil issue. It removed all the other lookup items i put in the field even if it did remove the links as well. I mean i have a country lookup field. So it removed other countries in the lookup field and leaves only the 1st country. Pls how do i sort this out. thanks.<br /><br />Ola.Anonymoushttps://www.blogger.com/profile/09748640608205478693noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-57684619737043539132010-08-22T17:47:35.519+05:302010-08-22T17:47:35.519+05:30Indrakeela,
put this script in content editor web...Indrakeela,<br /><br />put this script in content editor webpart above your listview webpartSharePoint Kingshttps://www.blogger.com/profile/08472838332009399790noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-51885514121791440532010-08-20T17:39:58.229+05:302010-08-20T17:39:58.229+05:30Really Im new to sharepoint. I don't know wher...Really Im new to sharepoint. I don't know where I want to put the above java script? <br />Please help me to solve it....Erandahttps://www.blogger.com/profile/10043529901801594763noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-46713955754179548712010-06-09T21:13:33.997+05:302010-06-09T21:13:33.997+05:30Hay Anonymous,
Thanks for your tip.Hay Anonymous,<br /><br />Thanks for your tip.SharePoint Kingshttps://www.blogger.com/profile/08472838332009399790noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-71067216468796748082010-06-09T13:33:59.793+05:302010-06-09T13:33:59.793+05:30It is not working with FF!
Replace:
if(oP[i].attr...It is not working with FF!<br /><br />Replace:<br />if(oP[i].attributes["href"].value.indexOf("RootFolder=*")!= -1)<br /><br />With:<br />if(oP[i].href.value.indexOf("RootFolder=*")!= -1)<br /><br />To support both FF and IE :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-51761038424024812932010-05-18T22:27:23.131+05:302010-05-18T22:27:23.131+05:30OMG you are awesome!!
Thank You Thank You !OMG you are awesome!!<br /><br />Thank You Thank You !$!mhttps://www.blogger.com/profile/14880982394535066584noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-27939674816949234232010-04-21T22:35:19.283+05:302010-04-21T22:35:19.283+05:30Hay Jay, can you pest link again. :)Hay Jay, can you pest link again. :)Parth Patelhttps://www.blogger.com/profile/05132175585607358084noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-53406270373577644822010-04-20T16:40:38.524+05:302010-04-20T16:40:38.524+05:30There is an easier way available I think.
In my c...There is an easier way available I think.<br /><br />In my case, I modified XSL tag to get the value I wanted. <br />Check this:Jayvardhan Patil (Jay)https://www.blogger.com/profile/11535986897175308726noreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-14633856794842259562010-02-20T21:08:57.226+05:302010-02-20T21:08:57.226+05:30Wonderful. If you were not already kings, you earn...Wonderful. If you were not already kings, you earned your crown with this one.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8705297068966115777.post-80955576734384710472009-11-05T22:21:40.724+05:302009-11-05T22:21:40.724+05:30keep it up, tkskeep it up, tksAnonymousnoreply@blogger.com