function selectChangeNoAkun(control_NoAkun, control_coa_01_no, control_coa_02_no, control_coa_03_no, control_coa_04_no, coa_01Array1, coa_02NameArray1, coa_01Array2, ItemArray2, ItemNameArray2, coa_01Array3, coa_02Array3, ItemArray3, ItemNameArray3, coa_01Array4, coa_02Array4, coa_03Array4, ItemArray4, ItemNameArray4, ) { var myEle ; var x ; var NoAkun = control_NoAkun.value.split(""); // Empty the first drop down box of any choices for (var q=control_coa_01_no.options.length; q>=0; q--) control_coa_01_no.options[q]=null; // Empty the second drop down box of any choices for (var q=control_coa_02_no.options.length;q>=0;q--) control_coa_02_no.options[q]=null; // Empty the third drop down box of any choices for (var q=control_coa_03_no.options.length;q>=0;q--) control_coa_03_no.options[q]=null; // Empty the forth drop down box of any choices for (var q=control_coa_04_no.options.length;q>=0;q--) control_coa_04_no.options[q]=null; // ADD Default Choice - in case there are no values // comment by yosa //myEle = document.createElement("option") ; //myEle.value = 0 ; //myEle.text = "[SELECT]" ; //control_coa_02_no.appendChild(myEle) // coa_01 for ( x = 0 ; x < coa_01Array1.length ; x++ ) { myEle = document.createElement("option") ; myEle.setAttribute("value",coa_01Array1[x]); if (coa_01Array1[x] == NoAkun[0]){ myEle.setAttribute("selected",true); } // var txt = document.createTextNode(coa_01Array1[x]); // replace by yosa: if (coa_01Array1[x] == "") { var temp_txt = ""; } else { var temp_txt = coa_01Array1[x] + " " + coa_02NameArray1[x]; } var txt = document.createTextNode(temp_txt); myEle.appendChild(txt) control_coa_01_no.appendChild(myEle) } // coa_02 for ( x = 0 ; x < ItemArray2.length ; x++ ) { if (coa_01Array2[x] == control_coa_01_no.value) { myEle = document.createElement("option") ; myEle.setAttribute("value",ItemArray2[x]); if ((coa_01Array2[x] == NoAkun[0]) & (ItemArray2[x] == NoAkun[1]) ){ myEle.setAttribute("selected",true); } // var txt = document.createTextNode(ItemArray2[x]); // replace by yosa: if (ItemArray2[x] == "") { var temp_txt = ""; } else { var temp_txt = coa_01Array2[x] + + ItemArray2[x] + " " + ItemNameArray2[x]; } var txt = document.createTextNode(temp_txt); myEle.appendChild(txt) control_coa_02_no.appendChild(myEle) } } // coa_03 for ( x = 0 ; x < ItemArray3.length ; x++ ) { if ((coa_01Array3[x] == control_coa_01_no.value ) & (coa_02Array3[x] == control_coa_02_no.value )){ myEle = document.createElement("option") ; myEle.setAttribute("value",ItemArray3[x]); if ((coa_01Array3[x] == NoAkun[0]) & (coa_02Array3[x] == NoAkun[1]) & (ItemArray3[x] == NoAkun[2]) ){ myEle.setAttribute("selected",true); } // var txt = document.createTextNode(ItemArray3[x]); // replace by yosa: if (ItemArray3[x] == "") { var temp_txt = ""; } else { var temp_txt = coa_01Array3[x] + + coa_02Array3[x] + + ItemArray3[x] + " " + ItemNameArray3[x]; } var txt = document.createTextNode(temp_txt); myEle.appendChild(txt) control_coa_03_no.appendChild(myEle) } } // coa_04 for ( x = 0 ; x < ItemArray4.length ; x++ ) { if ((coa_01Array4[x] == control_coa_01_no.value ) & (coa_02Array4[x] == control_coa_02_no.value ) & (coa_03Array4[x] == control_coa_03_no.value ) ){ myEle = document.createElement("option") ; myEle.setAttribute("value",ItemArray4[x]); if ((coa_01Array4[x] == NoAkun[0]) & (coa_02Array4[x] == NoAkun[1]) & (coa_03Array4[x] == NoAkun[2]) & (ItemArray4[x] == NoAkun[3]) ){ myEle.setAttribute("selected",true); } // var txt = document.createTextNode(ItemArray4[x]); // replace by yosa: if (ItemArray4[x] == "") { var temp_txt = ""; } else { var temp_txt = coa_01Array4[x] + + coa_02Array4[x] + + coa_03Array4[x] + + ItemArray4[x] + " " + ItemNameArray4[x]; } var txt = document.createTextNode(temp_txt); myEle.appendChild(txt) control_coa_04_no.appendChild(myEle) } } } function selectChange12a(control_coa_01_no, control_coa_02_no, control_coa_03_no, control_coa_04_no, coa_01Array, ItemArray, ItemNameArray, control_no_akun, no_akunArray, nama_akunArray, ) { var myEle ; var x ; // Empty NoAkun box of any choices for (var q=control_no_akun.options.length;q>=0;q--) control_no_akun.options[q]=null; // Empty the second drop down box of any choices for (var q=control_coa_02_no.options.length;q>=0;q--) control_coa_02_no.options[q]=null; // Empty the third drop down box of any choices for (var q=control_coa_03_no.options.length;q>=0;q--) control_coa_03_no.options[q]=null; // Empty the forth drop down box of any choices for (var q=control_coa_04_no.options.length;q>=0;q--) control_coa_04_no.options[q]=null; // ADD Default Choice - in case there are no values // comment by yosa //myEle = document.createElement("option") ; //myEle.value = 0 ; //myEle.text = "[SELECT]" ; //control_coa_02_no.appendChild(myEle) // Now loop through the array of individual items // Any containing the same child id are added to // the second dropdown box for ( x = 0 ; x < ItemArray.length ; x++ ) { if ( coa_01Array[x] == control_coa_01_no.value ) { myEle = document.createElement("option") ; myEle.setAttribute("value",ItemArray[x]); // var txt = document.createTextNode(ItemArray[x]); // replace by yosa: if (ItemArray[x] == "") { var temp_txt = ""; } else { var temp_txt = coa_01Array[x] + + ItemArray[x] + " " + ItemNameArray[x]; } var txt = document.createTextNode(temp_txt); myEle.appendChild(txt) control_coa_02_no.appendChild(myEle) } } // control_no_akun for ( x = 0 ; x < no_akunArray.length ; x++ ) { myEle = document.createElement("option") ; myEle.setAttribute("value",no_akunArray[x]); // var txt = document.createTextNode(no_akunArray[x]); // replace by yosa: if (no_akunArray[x] == "") { var temp_txt = ""; } else { var temp_txt = no_akunArray[x] + " " + nama_akunArray[x]; } var txt = document.createTextNode(temp_txt); myEle.appendChild(txt) control_no_akun.appendChild(myEle) } } function selectChange23a(control_coa_01_no, control_coa_02_no, control_coa_03_no, control_coa_04_no, coa_01Array, coa_02Array, ItemArray, ItemNameArray, control_no_akun, no_akunArray, nama_akunArray, ) { var myEle ; var x ; // Empty NoAkun box of any choices for (var q=control_no_akun.options.length;q>=0;q--) control_no_akun.options[q]=null; // Empty the second drop down box of any choices for (var q=control_coa_03_no.options.length;q>=0;q--) control_coa_03_no.options[q]=null; // Empty the third drop down box of any choices for (var q=control_coa_04_no.options.length;q>=0;q--) control_coa_04_no.options[q]=null; // ADD Default Choice - in case there are no values // comment by yosa //myEle = document.createElement("option") ; //myEle.value = 0 ; //myEle.text = "[SELECT]" ; //control_coa_03_no.appendChild(myEle) // Now loop through the array of individual items // Any containing the same child id are added to // the second dropdown box for ( x = 0 ; x < ItemArray.length ; x++ ) { if ((coa_01Array[x] == control_coa_01_no.value ) & (coa_02Array[x] == control_coa_02_no.value )){ myEle = document.createElement("option") ; myEle.setAttribute("value",ItemArray[x]); // var txt = document.createTextNode(ItemArray[x]); // replace by yosa: if (ItemArray[x] == "") { var temp_txt = ""; } else { var temp_txt = coa_01Array[x] + + coa_02Array[x] + + ItemArray[x] + " " + ItemNameArray[x]; } var txt = document.createTextNode(temp_txt); myEle.appendChild(txt) control_coa_03_no.appendChild(myEle) } } // control_no_akun for ( x = 0 ; x < no_akunArray.length ; x++ ) { myEle = document.createElement("option") ; myEle.setAttribute("value",no_akunArray[x]); // var txt = document.createTextNode(no_akunArray[x]); // replace by yosa: if (no_akunArray[x] == "") { var temp_txt = ""; } else { var temp_txt = no_akunArray[x] + " " + nama_akunArray[x]; } var txt = document.createTextNode(temp_txt); myEle.appendChild(txt) control_no_akun.appendChild(myEle) } } function selectChange34a(control_coa_01_no, control_coa_02_no, control_coa_03_no, control_coa_04_no, coa_01Array, coa_02Array, coa_03Array, ItemArray, ItemNameArray, control_no_akun, no_akunArray, nama_akunArray, ) { var myEle ; var x ; // Empty NoAkun box of any choices for (var q=control_no_akun.options.length;q>=0;q--) control_no_akun.options[q]=null; // Empty the second drop down box of any choices for (var q=control_coa_04_no.options.length;q>=0;q--) control_coa_04_no.options[q]=null; // ADD Default Choice - in case there are no values // comment by yosa //myEle = document.createElement("option") ; //myEle.value = 0 ; //myEle.text = "[SELECT]" ; //control_coa_04_no.appendChild(myEle) // Now loop through the array of individual items // Any containing the same child id are added to // the second dropdown box for ( x = 0 ; x < ItemArray.length ; x++ ) { if ((coa_01Array[x] == control_coa_01_no.value ) & (coa_02Array[x] == control_coa_02_no.value ) & (coa_03Array[x] == control_coa_03_no.value ) ){ myEle = document.createElement("option") ; myEle.setAttribute("value",ItemArray[x]); // var txt = document.createTextNode(ItemArray[x]); // replace by yosa: if (ItemArray[x] == "") { var temp_txt = ""; } else { var temp_txt = coa_01Array[x] + + coa_02Array[x] + + coa_03Array[x] + + ItemArray[x] + " " + ItemNameArray[x]; } var txt = document.createTextNode(temp_txt); myEle.appendChild(txt) control_coa_04_no.appendChild(myEle) } } // control_no_akun for ( x = 0 ; x < no_akunArray.length ; x++ ) { myEle = document.createElement("option") ; myEle.setAttribute("value",no_akunArray[x]); // var txt = document.createTextNode(no_akunArray[x]); // replace by yosa: if (no_akunArray[x] == "") { var temp_txt = ""; } else { var temp_txt = no_akunArray[x] + " " + nama_akunArray[x]; } var txt = document.createTextNode(temp_txt); myEle.appendChild(txt) control_no_akun.appendChild(myEle) } } function selectChange4a (control_coa_01_no, control_coa_02_no, control_coa_03_no, control_coa_04_no, control_no_akun, no_akunArray, nama_akunArray, ) { var myEle ; var x ; // Empty NoAkun box of any choices for (var q=control_no_akun.options.length;q>=0;q--) control_no_akun.options[q]=null; var tmp_no_akun = control_coa_01_no.value + control_coa_02_no.value + control_coa_03_no.value + control_coa_04_no.value; // control_no_akun for ( x = 0 ; x < no_akunArray.length ; x++ ) { myEle = document.createElement("option") ; myEle.setAttribute("value",no_akunArray[x]); if (no_akunArray[x] == tmp_no_akun){ myEle.setAttribute("selected",true); } // var txt = document.createTextNode(no_akunArray[x]); // replace by yosa: if (no_akunArray[x] == "") { var temp_txt = ""; } else { var temp_txt = no_akunArray[x] + " " + nama_akunArray[x]; } var txt = document.createTextNode(temp_txt); myEle.appendChild(txt) control_no_akun.appendChild(myEle) } } function selectChange12(control_coa_01_no, control_coa_02_no, control_coa_03_no, control_coa_04_no, coa_01Array, ItemArray, ItemNameArray) { var myEle ; var x ; // Empty the second drop down box of any choices for (var q=control_coa_02_no.options.length;q>=0;q--) control_coa_02_no.options[q]=null; // Empty the third drop down box of any choices for (var q=control_coa_03_no.options.length;q>=0;q--) control_coa_03_no.options[q]=null; // Empty the forth drop down box of any choices for (var q=control_coa_04_no.options.length;q>=0;q--) control_coa_04_no.options[q]=null; // ADD Default Choice - in case there are no values // comment by yosa //myEle = document.createElement("option") ; //myEle.value = 0 ; //myEle.text = "[SELECT]" ; //control_coa_02_no.appendChild(myEle) // Now loop through the array of individual items // Any containing the same child id are added to // the second dropdown box for ( x = 0 ; x < ItemArray.length ; x++ ) { if ( coa_01Array[x] == control_coa_01_no.value ) { myEle = document.createElement("option") ; myEle.setAttribute("value",ItemArray[x]); // var txt = document.createTextNode(ItemArray[x]); // replace by yosa: if (ItemArray[x] == "") { var temp_txt = ""; } else { var temp_txt = coa_01Array[x] + + ItemArray[x] + " " + ItemNameArray[x]; } var txt = document.createTextNode(temp_txt); myEle.appendChild(txt) control_coa_02_no.appendChild(myEle) } } } function selectChange23(control_coa_01_no, control_coa_02_no, control_coa_03_no, control_coa_04_no, coa_01Array, coa_02Array, ItemArray, ItemNameArray) { var myEle ; var x ; // Empty the second drop down box of any choices for (var q=control_coa_03_no.options.length;q>=0;q--) control_coa_03_no.options[q]=null; // Empty the third drop down box of any choices for (var q=control_coa_04_no.options.length;q>=0;q--) control_coa_04_no.options[q]=null; // ADD Default Choice - in case there are no values // comment by yosa //myEle = document.createElement("option") ; //myEle.value = 0 ; //myEle.text = "[SELECT]" ; //control_coa_03_no.appendChild(myEle) // Now loop through the array of individual items // Any containing the same child id are added to // the second dropdown box for ( x = 0 ; x < ItemArray.length ; x++ ) { if ((coa_01Array[x] == control_coa_01_no.value ) & (coa_02Array[x] == control_coa_02_no.value )){ myEle = document.createElement("option") ; myEle.setAttribute("value",ItemArray[x]); // var txt = document.createTextNode(ItemArray[x]); // replace by yosa: if (ItemArray[x] == "") { var temp_txt = ""; } else { var temp_txt = coa_01Array[x] + + coa_02Array[x] + + ItemArray[x] + " " + ItemNameArray[x]; } var txt = document.createTextNode(temp_txt); myEle.appendChild(txt) control_coa_03_no.appendChild(myEle) } } } function selectChange34(control_coa_01_no, control_coa_02_no, control_coa_03_no, control_coa_04_no, coa_01Array, coa_02Array, coa_03Array, ItemArray, ItemNameArray) { var myEle ; var x ; // Empty the second drop down box of any choices for (var q=control_coa_04_no.options.length;q>=0;q--) control_coa_04_no.options[q]=null; // ADD Default Choice - in case there are no values // comment by yosa //myEle = document.createElement("option") ; //myEle.value = 0 ; //myEle.text = "[SELECT]" ; //control_coa_04_no.appendChild(myEle) // Now loop through the array of individual items // Any containing the same child id are added to // the second dropdown box for ( x = 0 ; x < ItemArray.length ; x++ ) { if ((coa_01Array[x] == control_coa_01_no.value ) & (coa_02Array[x] == control_coa_02_no.value ) & (coa_03Array[x] == control_coa_03_no.value ) ){ myEle = document.createElement("option") ; myEle.setAttribute("value",ItemArray[x]); // var txt = document.createTextNode(ItemArray[x]); // replace by yosa: if (ItemArray[x] == "") { var temp_txt = ""; } else { var temp_txt = coa_01Array[x] + + coa_02Array[x] + + coa_03Array[x] + + ItemArray[x] + " " + ItemNameArray[x]; } var txt = document.createTextNode(temp_txt); myEle.appendChild(txt) control_coa_04_no.appendChild(myEle) } } }