1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109:
var; var nTopics; var aTopicText; var aTopicValue; var aSubtopicText; var aSubtopicValue; nSelectedTopic var; nSelectedSubtopic var; functie OnInitial () { //debugger; ; var i, j, strSubtopic n, strTopic; nTopics =document.getElementById („_ctl0_ContentPlaceHolder1_ddlTopic“) .options.length; aTopicText = nieuwe Serie (nTopics); aTopicValue = nieuwe Serie (nTopics); voor (i=0; nTopics i<; i++) { aTopicText [I] = document.getElementById („_ctl0_ContentPlaceHolder1_ddlTopic“) .options [I] .text; aTopicValue [I] = document.getElementById („_ctl0_ContentPlaceHolder1_ddlTopic“) .options [I] .value; } nSubtopics = („_ctl0_ContentPlaceHolder1_ddlSubtopic“) .options.length document.getElementById; aSubtopicText = nieuwe Serie (nSubtopics); aSubtopicValue = nieuwe Serie (nSubtopics); voor (I = 0; i < nSubtopics; i++) { aSubtopicText [I] = document.getElementById („_ctl0_ContentPlaceHolder1_ddlSubtopic“) .options [I] .text; aSubtopicValue [I] = document.getElementById („_ctl0_ContentPlaceHolder1_ddlSubtopic“) .options [I] .value; } nSelectedTopic = document.getElementById („_ctl0_ContentPlaceHolder1_ddlTopic“) .selectedIndex; nSelectedSubtopic = document.getElementById („_ctl0_ContentPlaceHolder1_ddlSubtopic“) .selectedIndex; als (nSelectedTopic == 0) { document.getElementById („_ctl0_ContentPlaceHolder1_ddlSubtopic“) .options.length = 1; } anders { strTopic = document.getElementById („_ctl0_ContentPlaceHolder1_ddlTopic“) .options [nSelectedTopic] .text; n = strTopic.length; j = 0; voor (I = 1; i < nSubtopics; i++) { strSubtopic = aSubtopicValue [I]; als (strTopic! = strSubtopic.substring (0, n)) { document.getElementById („_ctl0_ContentPlaceHolder1_ddlSubtopic“) .options [I - j] = verklaren nietig; j++; } } } } functie OnChangeTopic () {var i, j, strSubtopicVal n, strTopic, strSubtopic; als (nSelectedTopic! = document.getElementById („_ctl0_ContentPlaceHolder1_ddlTopic“) .selectedIndex) { nSelectedTopic = document.getElementById („_ctl0_ContentPlaceHolder1_ddlTopic“) .selectedIndex; strTopic = document.getElementById („_ctl0_ContentPlaceHolder1_ddlTopic“) [nSelectedTopic] .text; document.getElementById („_ctl0_ContentPlaceHolder1_ddlSubtopic“) .options.length = 1; als (nSelectedTopic! = 0) { j = 1; n = strTopic.length; voor (I = 1; i < nSubtopics; i++) { //strSubtopic = aSubtopicValue [I]; strSubtopic = aSubtopicText [I]; strSubtopicVal = aSubtopicValue [I]; als (strTopic == strSubtopic.substring (0, n)) { document.getElementById („_ctl0_ContentPlaceHolder1_ddlSubtopic“) .options [j] = nieuwe Optie (strSubtopic.substring (n + 1, strSubtopicVal strSubtopic.length),); als (nSelectedSubtopic == i) { document.getElementById („_ctl0_ContentPlaceHolder1_ddlSubtopic“) .selectedIndex = j; } j++; } } } } } functie OnChangeSubtopic () {var i, strSubtopic n; n = document.getElementById („_ctl0_ContentPlaceHolder1_ddlSubtopic“) .selectedIndex; als (n == 0) { nSelectedSubtopic = 0; } anders { strSubtopic = document.getElementById („_ctl0_ContentPlaceHolder1_ddlSubtopic“) [n] .value; voor (I = 1; i < nSubtopics; i++) { als (strSubtopic == aSubtopicValue [I]) { nSelectedSubtopic = I; onderbreking; } } } }