I have been developing a Sharepoint App that includes a feature to extract contact details from a list on the Sharepoint site. Below is a snippet of my code:
var currentOpeningContent = '<h4 onclick="ShowJobDetail(\'' + encodeURI(currentOpeningTitle.text()) + encodeURI(currentOpeningRR.text()) '\');">'+Show details+'</h4>';
$("#open_jobs").append(currentOpeningContent);
function ShowJobDetail(title, roles)
{
$(".job_page_title").html(decodeURI(title));
$(".job_roles").html(decodeURI(roles));
}
The issue I am facing is that when an email id is passed in the "roles" parameter, it appears as plain text due to decodeURI method. However, my goal is to have a popup window open when a user clicks on the email id.