function updateNumCreatedRows(fid, iVal) { var iTemp = parseInt($("#"+fid).val()); iTemp = (iTemp + iVal); $("#"+fid).val(iTemp); return false; } // END function updateNumCreatedRows() function disableEnterKey() { $('input').bind("keyup keypress", function(e) { var code = e.keyCode || e.which; if (code == 13) { e.preventDefault(); return false; } // END if }); } // END function disableEnterKey() function setSelectOptions(fid, urlJSON, bKeyValueFlag, keySelected) { $.ajax({ method: "POST", url: urlJSON, data: { }, dataType: "json", success: function(getJSON) { getSelectMenuKeyValueJSON(fid, getJSON, bKeyValueFlag, keySelected); }, failure: function() { alert('Error in retrieving Service Category information. Please try again later.'); } }); return false; } // END function setSelectOptions() function getSelectMenuKeyValueJSON(slctName, arrJSON, bKeyValue, keySelected) { var iNumItems = arrJSON.length; var slctMenuHTML = ""; var iX = 0; $("#"+slctName).empty(); $("#"+slctName).append($('', { value: "", text: "- Please select -" })); $.each(arrJSON, function(key, value) { iX++; switch (bKeyValue) { case "F1": $("#"+slctName).append($('', { value: value[0], text: value[0]+"-"+value[1] })); break; case "F2": $("#"+slctName).append($('', { value: value[0], text: value[0] })); break; case "F3": $("#"+slctName).append($('', { value: value[0], text: value[1] })); break; default: $("#"+slctName).append($('', { value: key, text: value[1] })); } // END switch if (bKeyValue == 1) { } else if (bKeyValue == 2) { } else { } // END if }); if (keySelected != "") { $('#'+slctName).find('option[value='+keySelected+']').prop("selected",true); } // END if return false; } // END function getSelectMenuKeyValueJSON() function getFormLabelsJS(fid, label) { strFormElements = ""; strFormElements += "\n"; return strFormElements; } // END getFormLabelsJS() function getFormHiddenJS(fid, cssClass, jsOnChange, valThis, bReadOnly) { strFormElements = ""; strFormElements += "- Please select -\n"; } // END if strReturn += "\n"; return strReturn; } // END function getSelectMenuArrayJS() function clickClearForm() { $("#txtSignatureBox").prop("readonly", true); return false; } // END function clickClearForm()