Quantcast
Viewing all articles
Browse latest Browse all 6517

New Post: GetListItems

Hyperlink or Picture columns do take two values, but they aren't two images. The first is the hyperlink, the second is the text that SharePoint will normally display when you see the link. These two values are stored in the column like "link, link text". So if you just want the link, you split on the comma and take the first element; if you just want the text, you take the second.
var thisLink = $(this).attr("ows_CategoryImage").split(",");
var out = "<a href='" + thisLink[0] + "'>" + thisLink[1] + "</a>";
The other alternative is to just use a Single line of text column to hold the link if you don't need SharePoint to understand that it's a link.

M.

Viewing all articles
Browse latest Browse all 6517

Trending Articles