I have list view which contains 4 columns.
I have Select Country
is a calculated column. The formula for the calculated column is:
="<a href='javascript:SelectCountry("&CountryCode&")'>Select Country</a>"
I need the Select Country
column as hyperlink as below, using return type of calculated column as Single line of text.
For that I have Used following JavaScript code.
function reformatCalculatedColumnUrl(){
debugger;
$(".ms-cellstyle.ms-vb2:contains('href')").each(function(){
$(this).html($(this).text());
});
}
I got the expected result as Select Country
as hyperlink, but when I click on any one of the Select Country
hyperlinks, the following JavaScript error comes up.
Can anybody tell me why this JS error comes up? Is there any alternate way to convert the calculated column with Single line of text as return type to hyperlink?