Could you please help on how to add if condition to the below snippet?
Snippet:
function ServiceSucceeded(result) {
$('#accNo12').empty();
if (DataType == "json") {
$('#accNo12').append("<div id=\"Search\" class=\"results\">"+
"<span id=\"lb\">Account No:"+result.U_ID+"</span></div>"+
"<label>RelMgr: </label>"+
"<span id=\"RID\">"+result.REL_NAME +"</span><br />"+
"<label>Off ID: </label><span id=\"OffId\">"+ result.SO+"</span><br/>");
}
}
how do i add an if condition to the above snippet in the case where i needed a condition as
if(result.SO==""){
<label>Off ID: </label><span id=\"OffId\">"+ result.SO+"</span><br/>"
}
else
{
<label>Off ID: </label><span id=\"OffId\">No ID found</span><br/>"
}
Appreciate if you could help
Thanks
1 Answer