//SET VALUE FOR MULTIPLE SUBMIT BUTTON function printDisclaimer() { rightnavDiv = document.getElementById("rightnav"); pWin = window.open('','pWin','location=yes, menubar=yes, scrollbars=yes,toolbar=yes'); pWin.document.open(); pWin.document.write(''); pWin.document.write(''); pWin.document.write(''); pWin.document.write('
'); pWin.document.write(rightnavDiv.innerHTML); if (pWin.document.getElementById("print")!=null && pWin.document.getElementById("cancel")!=null) { pWin.document.getElementById("print").style.display="none"; pWin.document.getElementById("cancel").style.display="none"; } pWin.document.write(''); pWin.print(); pWin.document.close(); pWin.close(); } function printCertificates() { rightnavDiv = document.getElementById("rightnav"); pWin = window.open('','pWin','location=yes, menubar=yes, scrollbars=yes,toolbar=yes'); pWin.document.open(); pWin.document.write(''); pWin.document.write(''); pWin.document.write(''); pWin.document.write(rightnavDiv.innerHTML); pWin.document.write(''); pWin.print(); pWin.document.close(); pWin.close(); } function printLineItems() { printingDiv = document.getElementById("printing"); pWin = window.open('','pWin','location=yes, menubar=yes, scrollbars=yes, toolbar=yes'); pWin.document.open(); pWin.document.write(' Enrollment and Completion Details '); pWin.document.write(''); pWin.document.write(''); pWin.document.write(''); pWin.document.write(''); pWin.document.write('
'); pWin.document.write('
'); pWin.document.write(printingDiv.innerHTML); if (pWin.document.getElementById("updatebutton")!=null && pWin.document.getElementById("swapcourse")!=null && pWin.document.getElementById("receipt")!=null) { pWin.document.getElementById("updatebutton").innerHTML=""; pWin.document.getElementById("swapcourse").innerHTML=""; pWin.document.getElementById("receipt").innerHTML=""; } if(pWin.document.getElementById("formFieldFullCol")!=null){ pWin.document.getElementById("formFieldFullCol").innerHTML=""; } pWin.document.write('
'); pWin.document.write(''); pWin.print(); pWin.document.close(); pWin.close(); } function printCertificate() { rightnaveDiv = document.getElementById("rightnav"); pWin = window.open('','pWin','location=yes, menubar=yes, scrollbars=yes,toolbar=yes'); pWin.document.open(); pWin.document.write(''); pWin.document.write(''); pWin.document.write(''); pWin.document.write(rightnaveDiv.innerHTML); pWin.document.getElementById("success").innerHTML=""; pWin.document.getElementById("buttons").innerHTML=""; pWin.document.write(''); pWin.print(); pWin.document.close(); pWin.close(); } function setAction(controllingField, target){ controllingField.value = target; } function setHiddenValue(controllingField, target){ for(var i=0;i< window.document.forms[0].elements.length;i++){ if(window.document.forms[0].elements[i].type != 'hidden' && window.document.forms[0].elements[i]==controllingField){ alert(window.document.forms[0].elements[i]); alert(target); window.document.forms[0].elements[i].value=target; } } } function setDispatchMethod(methodValue, actionUrl){ window.document.forms[0].target="_self"; window.document.forms[0].dispatchMethod.value = methodValue; window.document.forms[0].action = actionUrl; window.document.forms[0].submit(); } function setSubmitMethod(methodValue){ window.document.forms[0].submitAction.value = methodValue; window.document.forms[0].submit(); } //END SET VALUE FOR MULTIPLE SUBMIT BUTTON //ENABLE HIDDEN DIV WHEN CHECK-BOX IS CHECKED function changeField(controllingField,idDiv){ if(controllingField.checked != null || controllingField.checked != 'undefined'){ if(controllingField.checked){ var div = window.document.getElementById(idDiv); div.style.visibility = "visible"; } if(!controllingField.checked){ var div = window.document.getElementById(idDiv); div.style.visibility = "hidden"; } } } //END ENABLE HIDDEN DIV WHEN CHECK-BOX IS CHECKED //SELECT-ONE IN A CHECK-BOX function checkBoxValidate(cb, size) { if(size == 1){ if(cb == 1){ window.document.forms[0].ckbox.checked = true; } } if(size > 1){ for (j = 0; j < size; j++) { if (eval("window.document.forms[0].ckbox[" + j + "].checked") == true) { window.document.forms[0].ckbox[j].checked = false; if (j == cb) { window.document.forms[0].ckbox[j].checked = true; } } } } } //SELECT-ONE IN A CHECK-BOX //MANAGE POP-UP function redirectPopUp(listsize){ var status; if(listsize == 1){ if (eval("window.document.forms[0].ckbox.checked") == true) { if(window.document.forms[0].ckbox.value != 'undefined'){ window.opener.document.forms[0].selValue.value = window.document.forms[0].ckbox.value; window.opener.document.forms[0].selValueName.value = window.document.forms[0].cknamebox.value; status = 1; } }else{ status = 0; } } if(listsize > 1){ for (j = 0; j < listsize; j++) { if (eval("window.document.forms[0].ckbox[" + j + "].checked") == true) { if(window.document.forms[0].ckbox[j].value != 'undefined'){ window.opener.document.forms[0].selValue.value = window.document.forms[0].ckbox[j].value; window.opener.document.forms[0].selValueName.value = window.document.forms[0].cknamebox[j].value; status = 1; } }else{ status = 0; } if(status == 1) break; } } if(status == 1){ self.close(); } } //MANAGE POP-UP //MANAGE SELECT BOX function getComboText(controllingField, targetField){ var index = window.document.forms[professionLookupForm].searchProfessionId.selectedIndex; var selectedText = window.document.forms[professionLookupForm].searchProfessionId.options[index].text; alert(selectedText); window.document.forms[0].targetField.value = selectedText; } //MANAGE SELECT BOX //MANAGE DROP-DOWN 11 function submitForm(actionUrl){ window.document.forms[0].action = actionUrl; window.document.forms[0].submit(); } function setAction(actionUrl){ window.document.forms[0].action = actionUrl; } function submitPage(){ window.document.forms[0].submit(); } //MANAGE ENTER KEY PRESS IN THE PAGINATION TEXTFIELD function submit_keyGo(event, actionUrl){ var unicode=event.keyCode; if(unicode==13) { window.document.forms[0].action = actionUrl; window.document.forms[0].submit(); } } function paginate_keyGo(event, actionUrl, pageNum){ var unicode=event.keyCode; if(unicode==13) { window.document.forms[0].reqPage.value=pageNum; window.document.forms[0].action = actionUrl; window.document.forms[0].submit(); } } function popUp_keyGo(event, actionUrl, pageNum){ var unicode=event.keyCode; if(unicode==13) { window.document.forms[1].reqPage.value=pageNum; window.document.forms[1].action = actionUrl; window.document.forms[1].submit(); } } function paginateForm(actionUrl, pageNum){ window.document.forms[0].reqPage.value=pageNum; window.document.forms[0].action = actionUrl; window.document.forms[0].submit(); } function paginatePopUpForm(actionUrl, pageNum){ window.document.forms[1].reqPage.value=pageNum; window.document.forms[1].action = actionUrl; window.document.forms[1].submit(); } //MANAGE DROP-DOWN //MANAGE ENTER KEY PRESS IN THE TEXTFIELDS - ADDED BY PHANEES function handleEnter (field, event) { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if (keyCode == 13) { var i; for (i = 0; i < field.form.elements.length; i++) if (field == field.form.elements[i]) break; i = (i + 1) % field.form.elements.length; field.form.elements[i].focus(); return false; } else return true; } //ENABLE FIELD CHECK-BOX IS CHECKED function enableField(controllingField, targetField1, targetField2){ alert(targetField1); if(controllingField.checked != null || controllingField.checked != 'undefined'){ if(controllingField.checked){ if(targetField1.disabled!='undefined'){ targetField1.disabled="false"; } if(targetField2.disabled!='undefined'){ targetField2.disabled="false"; } } if(!controllingField.checked){ if(targetField1.disabled!='undefined'){ targetField1.disabled="true"; } if(targetField2.disabled!='undefined'){ targetField2.disabled="true"; } } } } //END ENABLE FIELD CHECK-BOX IS CHECKED //ENABLE TEXT FIELDS WHEN CHECK-BOX IS CHECKED function enableFormFields(controllingField, targetField1, targetField2){ if(controllingField.checked != null || controllingField.checked != 'undefined'){ if(controllingField.checked){ enableAll(); } else { disableAll(); } } } function enableAll(){ window.document.forms[0].targetField1.disabled=false; window.document.forms[0].targetField2.disabled=false; } function disableAll(){ window.document.forms[0].targetField1.disabled=true; window.document.forms[0].targetField2.disabled=true; } //ENABLE TEXT FIELDS WHEN CHECK-BOX IS CHECKED //MANAGE BUSINESS POP-UP function selectBusiness(){ var fld = window.document.forms[1].selValueName; var setValue = ""; var setName = ""; var flag = "false"; if(fld.length!='undefined' && fld.length>1){ for(var i = 0; i < fld.length;i++){ if(fld[i].checked) { setValue = fld[i].value; // here we are getting the alt value(ID of the B' Partner, to set the ID also in the parent form) setName = fld[i].alt; flag = "true"; } } } else if(fld.checked) { setValue = fld.value; setName = fld.alt; flag = "true"; } if(flag == "false") { displayerror = document.getElementById("selectBusiness"); displayerror.innerText = "Please Select Business"; return false; } opener.document.forms[0]['referringBusinessPartnerName'].value=setValue; opener.document.forms[0]['referringBusinessPartner'].value=setName; window.opener = top; window.close(); } function selectSalesRepresentative(){ var fld = document.forms[1].sivCheck; var setValue = ""; var flag = "false"; if(fld.length!='undefined' && fld.length>1){ for(var i = 0; i < fld.length;i++){ if(fld[i].checked) { setValue = fld[i].value; flag="true"; } } } else if(fld.checked){ setValue = fld.value; flag="true"; } if(flag == "false") { displayerror = document.getElementById("selectBusiness"); displayerror.innerText = "Please Select Business"; return false; } opener.document.forms[0]['salesRepresentative'].value=setValue; window.opener = top; window.close(); } function addNote(actionURL,action){ window.document.forms[0].action=window.document.forms[0].action + "?submitButton="+action; window.document.forms[0].submit(); opener.document.forms[0].action = actionURL; opener.document.forms[0].submit(); window.opener = top; window.close(); } function saveNote(actionURL){ opener.document.forms[0].action = actionURL; opener.document.forms[0].submit(); window.opener = top; window.close(); } function setBusiness(){ var fld = window.document.forms[1].selValueName; var setValue = ""; var setName = ""; var flag = "false"; var displayerror; if(fld.length!='undefined' && fld.length>1){ for(var i = 0; i < fld.length;i++){ if(fld[i].checked) { // here we are getting the alt value(ID of the B' Partner, to set the ID also in the parent form) setValue = fld[i].alt; setName = fld[i].value; flag = "true"; } } } else { if(fld.checked==true) { setValue = fld.alt; setName = fld.value; flag = "true"; } } if(flag == "true") { opener.document.forms[0]['businessName'].value=setValue; opener.document.forms[0]['businessId'].value=setName; window.opener = top; window.close(); } else { displayerror = document.getElementById("selectBusiness"); displayerror.innerText = "Please Select Business"; return false; } } //MANAGE BUSINESS POP-UP //MANAGE Shipment Configuration POP-UP function selectShipment(){ var fld = window.document.forms[1].shipmentConfig; var setValue = ""; var setName = ""; var flag = "false"; if(fld.length!='undefined' && fld.length>1){ for(var i = 0; i < fld.length;i++){ if(fld[i].checked) { setValue = fld[i].value; // here we are getting the alt value(ID of the B' Partner, to set the ID also in the parent form) setName = fld[i].alt; flag = "true"; } } } else if(fld.checked){ setValue = fld.value; setName = fld.alt; flag = "true"; } if(flag == "false") { displayerror = document.getElementById("selectBusiness"); displayerror.innerText = "Please Select Shipment Configuration"; return false; } opener.document.forms[0]['shipmentConfigId'].value=setValue; opener.document.forms[0]['shipmentType'].value=setName; window.opener = top; window.close(); } function selectBranch(){ var fld = window.document.forms[0].selValueName; var setValue = ""; var setName = ""; var flag = "false"; var displayerror; if(fld.length!='undefined' && fld.length>1){ for(var i = 0; i < fld.length;i++){ if(fld[i].checked) { setValue = fld[i].value; // here we are getting the alt value(ID of the B' Partner, to set the ID also in the parent form) setName = fld[i].alt; flag = "true"; } } } else { if(fld.checked==true) { setValue = fld.value; setName = fld.alt; flag = "true"; } } if(flag == "true") { opener.document.forms[0]['branchName'].value=setValue; opener.document.forms[0]['branchId'].value=setName; window.opener = top; window.close(); } else { displayerror = document.getElementById("selectBranch"); displayerror.innerText = "Please Select Branch"; return false; } } function showUnit(){ window.document.forms[0]['epiNumber'].disabled=true; var uType = window.document.forms[0]['unitType']; for(var i=0; i1){ for(var i = 0; i < fld.length;i++){ if(fld[i].checked) { flag = true; } } } else { if(fld.checked==true) { flag = true; } } if(flag) { window.document.forms[0].action=window.document.forms[0].action+"?submitAction=Assign"; window.document.forms[0].submit(); } else { displayerror = document.getElementById("selectUsertitle"); displayerror.innerHTML = "Please select at least one license type."; } } */ //Display results for keyboard enter key function submit_keyPress(e){ var unicode=e.keyCode; if(unicode==13) { document.forms[0].action=document.forms[0].action+"?submit_btn=Filter"; document.forms[0].submit(); } } function checkActivation() { if(document.forms[0].activationRequired.checked==true) { if(document.getElementById("examActivationdiv")!='undefined'){ document.getElementById("examActivationdiv").style.display=""; } }else { if(document.getElementById("examActivationdiv")!='undefined'){ document.getElementById("examActivationdiv").style.display="none"; } } }