As Tom mentioned in his comment, adCategoryRef might be not rendered. I just recommend you to try passing the select element in function parameters, like:
function onChangeSelectCategory(adCategoryRefSel) {
var adSelectedCategoryVal = adCategoryRefSel.options[adCategoryRefSel.selectedIndex].text; //error
}
And html:
<select onChange="onChangeSelectCategory(this);" style="visibility: visible" id="adCategory" class="category" name="category" style="width: 300pt">
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…