关于FORM表单中下拉框连动的问题,十万火急,急需高手指点!
首先,非常谢谢大家的能在百忙之中来帮小弟!
这个是我的部分原代码!大家看看他,我是用FRONTPAGE编的,脚本是VB的!后台数据库是SQL SEVER的,其实只有一些简单的SELECT语句。
这部分网页包含两个框架,分别为right.asp和left.asp。主要想解决的问题就是下拉框连动的问题,取消表单中的提交步骤!
是否能把left.asp中的<input type=“submit” value="提交"name="B1">删掉啊!而直接把第一个表单中的信息直接传到另一个中去呢?
还望各位版主和高手来多多指点:)
这两个下拉框分别在两个框架里:
1.left.asp:
<form method="POST" action="rghsyb_right.asp" target="right" >
<p align="center"><select size="1" name="D1">
<%
sqlstr="select b_name from rsv_code"
set rs=fcpdb.execute(sqlstr)
if not rs.eof and not rs.bof then
rs.movefirst
WHILE not rs.EOF
if trim(rs("b_name"))<>"溧阳" then
%>
<option value="<%=rs("b_name")%>"><%=TRIM(rs("b_name"))%></option>
<%
end if
rs.MoveNext
WEND
end if %>
</select><input type="submit" value="提交" name="B1"> </p>“就是它”
</form>
2.这一半另外那个选择框right.asp:
<form method="POST" target="mn" action="result.asp" name="form1">
<p align="center">测站名:<select size="1" name="D1">
<%
sknm=request.form("D1")
sqlstr="select stcd from rsv_code where b_name='" & sknm & "'"
set rs=fcpdb.execute(sqlstr)
if not rs.eof and not rs.bof then
if not isnull(rs("stcd")) then
vstcd=rs("stcd")
end if
end if
rs.close
sqlstr="select b_code from rsv_cdr where stcd='" & vstcd & "'"
set rs=fcpdb.execute(sqlstr)
if not rs.eof and not rs.bof then
if not isnull(rs("b_code")) then
vbcode=rs("b_code")
end if
end if
rs.close
sqlstr="select hs_code from rst_code where b_code='" & vbcode & "'"
set res=fcpdb.execute(sqlstr)
if not res.bof and not res.eof then
res.movefirst
WHILE not res.EOF
if not isnull(res("hs_code")) then
vhscode=res("hs_code")
end if
sqlstr="select stcd from st_cdr where hs_code='" & vhscode & "'"
set rs=fcpdb.execute(sqlstr)
if not rs.eof and not rs.bof then
if not isnull(rs("stcd")) then
vsd=rs("stcd")
end if
end if
rs.close
sqlstr="select hs_name from st_code where hs_type='F' and stcd='" & vsd & "'"
response.write sqlstr
set rs=fcpdb.execute(sqlstr)
if not rs.eof and not rs.bof then
rs.movefirst
WHILE not rs.EOF %>
<option value="<%=rs("hs_name")%>"><%=TRIM(rs("hs_name")%></option>
<%
rs.MoveNext
WEND
end if
res.MoveNext
WEND
end if
%>
</select>
大家费心了,再次感谢各位版主和高手能看完小弟的程序!真的很希望大家能帮帮我的忙,小弟一定将分数全数奉上!:)急急急!!