I am working on Sharepoint App. Their is one functionality to get the contact details from the sharepoint site list. Here is my piece of 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 only issue is that when an email id is passed in the "roles", it becomes a plain text because of decodeURI. But what i want is when an user clicks on the email id, popup window should open.