<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from kml_sclass"
rs.open sql,conn,1,1
%>
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("sclassname"))%>","<%= trim(rs("bclassid"))%>","<%= trim(rs("sclassid"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
{
document.myform.sclassid.length = 0;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.sclassid.options[document.myform.sclassid.length] = new Option(subcat[i][0],subcat[i][2]);
}
}
}