function getItsgInfo() { var extras= ""; if (jQuery("#itsSearch").length) { extras += '&itsSearch=' + jQuery("#itsSearch").val(); } if (jQuery("#itsDescribe").length) { extras += '&itsDescribe=' + jQuery("#itsDescribe").val(); } if (jQuery("#itsFamily").length) { extras += '&itsFamily=' + jQuery("#itsFamily").val(); } jQuery.ajax({ type: 'GET', async: false, url: ''+ '&page=com.other.AjaxUtil' + '&makeUniqueUrl=' + (new Date().valueOf()) + extras + '&getItsInfo=1', success: function(t) { try { jQuery("#naracatDiv").html(t); } catch (e) { alert("Problem retrieving search context" + e); } }, error: function(xhr, error) { alert("Problem retrieving search context" + e); } }); } function addControlId(event) { var id = jQuery(event.target).closest("tr").children().eq(1).text(); var val = jQuery("#field7").val(); if (val.indexOf(id)<0) { if (val.length>0) val += ","; val += id; } jQuery("#field7").val(val); } $(document).ready(function() { getItsgInfo(); jQuery("#naracatDiv").addClass("alert"); jQuery("#naracatDiv").addClass("alert-dark"); });