function fillCategory(){ // this function is used to fill the category list on load addOption(document.frmCaptcha.Category, 'Credit Programs', 'Credit Programs');addOption(document.frmCaptcha.Category, 'Extended Campus', 'Extended Campus');addOption(document.frmCaptcha.Category, 'Non Credit Programs', 'Non Credit Programs');addOption(document.frmCaptcha.Category, 'Palmetto Programs', 'Palmetto Programs');addOption(document.frmCaptcha.Category, 'System Affairs', 'System Affairs');addOption(document.frmCaptcha.Category, 'Website', 'Website');} // end of JS function function SelectSubCat(){ // ON or after selection of category this function will work removeAllOptions(document.frmCaptcha.SubCat); addOption(document.frmCaptcha.SubCat, "", "General Information", ""); // Collect all element of subcategory for various cat_id if(document.frmCaptcha.Category.value == 'Credit Programs'){addOption(document.frmCaptcha.SubCat,'Adult Student Advancement Program', 'Adult Student Advancement Program');addOption(document.frmCaptcha.SubCat,'Adult Student Services', 'Adult Student Services');addOption(document.frmCaptcha.SubCat,'Evening Program', 'Evening Program');addOption(document.frmCaptcha.SubCat,'Ft. Jackson', 'Ft. Jackson');addOption(document.frmCaptcha.SubCat,'Weekend Program', 'Weekend Program');}if(document.frmCaptcha.Category.value == 'Non Credit Programs'){addOption(document.frmCaptcha.SubCat,'Adventure Series', 'Adventure Series');addOption(document.frmCaptcha.SubCat,'CEU', 'CEU');addOption(document.frmCaptcha.SubCat,'Conferences', 'Conferences');addOption(document.frmCaptcha.SubCat,'Online Learning', 'Online Learning');addOption(document.frmCaptcha.SubCat,'Professional Enrichment', 'Professional Enrichment');addOption(document.frmCaptcha.SubCat,'Test Prep', 'Test Prep');}if(document.frmCaptcha.Category.value == 'System Affairs'){addOption(document.frmCaptcha.SubCat,'Central Financial Aid', 'Central Financial Aid');addOption(document.frmCaptcha.SubCat,'Regional Campus Faculty', 'Regional Campus Faculty');addOption(document.frmCaptcha.SubCat,'Regional Campus Faculty Senate', 'Regional Campus Faculty Senate');addOption(document.frmCaptcha.SubCat,'Regional Campus Students', 'Regional Campus Students');addOption(document.frmCaptcha.SubCat,'Regional Campus T&P', 'Regional Campus T&P');addOption(document.frmCaptcha.SubCat,'Regional Campuses', 'Regional Campuses');addOption(document.frmCaptcha.SubCat,'Vice Provost Office', 'Vice Provost Office');}if(document.frmCaptcha.Category.value == 'Palmetto Programs'){addOption(document.frmCaptcha.SubCat,'Academics', 'Academics');}if(document.frmCaptcha.Category.value == 'Extended Campus'){addOption(document.frmCaptcha.SubCat,'', '');}if(document.frmCaptcha.Category.value == 'Website'){addOption(document.frmCaptcha.SubCat,'Broken Links', 'Broken Links');addOption(document.frmCaptcha.SubCat,'Erroneous Information', 'Erroneous Information');}} ////////////////// function removeAllOptions(selectbox) { var i; for(i=selectbox.options.length-1;i>=0;i--) { //selectbox.options.remove(i); selectbox.remove(i); } } function addOption(selectbox, value, text ) { var optn = document.createElement("OPTION"); optn.text = text; optn.value = value; selectbox.options.add(optn); }