Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

SPServices SPDisplayRelatedInfo jquery

$
0
0

I modified have my newform.aspx to have the $().SPServices.SPDisplayRelatedInfo

details of related information is also a lookup, when I choose the columName from the dropdown, it has a hyperlink.

What I want to do is to remove that and so I used some jquery css to remove.

<script language="javascript" type="text/javascript">
$(document).ready(function() {
$().SPServices.SPDisplayRelatedInfo({
	columnName: "Issue Type",
	relatedList: "ListName",
	relatedListColumn: "Title",
	relatedColumns: ["Issue_x0020_Category_x003a_Title", "Project ID"],
	displayFormat: "table",
	debug: true
	});
});
$(document).ready(function(){
      $('#SPDisplayRelatedInfo_Issue_x0020_Type').find('table,tr,th,td').css({'border':'1px solid'});
      $("a").removeAttr("href");
});

What happens with the above code are:

1. When I open the newform.aspx, the table headers in my SPDisplayRelatedInfo has a border -EXPECTED

2. When I choose an Issue Type from the dropdown, the related information are shown, but the border isGONE, and hyperlink are still there (it shouldn't be there since I have a jquery that removes the href)- ERROR

Now how will I fix this when the related info are shown, the hyperlinks are gone, and the table borders are there?


----------------------- Sharepoint Newbie





Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>