I used this following javascript function to trigger the contact phone number click functionality.but its not working can anyone help me out
function click2call(fieldName) {
var field = document.getElementById(fieldName);
field.style.textDecoration = "underline";
field.style.color = "blue";
field.ondblclick = function(){
if (field.value != null && field.value != "")
{
window.open("tel:" + field.value.replace(/\s/g,""));
}
}
}