Page is a not externally linkable
daveVk - 1:35 am on Feb 24, 2013 (gmt 0)
Consider giving subcategory selects different names, having multiple selects with same name likely to cause problems. If same name is a must, add/remove options from single select based on category.
Place subcategory selects within div with id="subcats" in category value order, each select with style="display:none"
function changeSelect( selectNo ) {
var sels = document.getElementById("subcats").getElementsByTagName('SELECT');
for( var j=0; j<sels.length; j++ ) {
sels[j].style.display = none;
if ( j===(selectNo-1) { sels[j].style.display = ''; }
}
}
<select name="category" onchange="changeSelect( this.value )" >