javascript 火狐下菜单联动问题
我有个省份,市,区。选择的三级联动菜单。IE没有任何问题,遨游也没有问题。火狐就不灵了。。请大家帮我解决一下。
不胜感激。。谢谢
代码如下:
《主页面》
<script language="JavaScript">
function GetCapital(capitalid)
{
document.frames["capitalframe"].location.replace("../function/getcapital.asp?capitalid="+capitalid);
}
function GetCity(cityid)
{
document.frames["cityframe"].location.replace("../function/getcity.asp?cityid="+cityid);
}
</script>
<TD bgcolor="#efefef">
<select name="province" size="1" id="select3" onChange=GetCapital(this.options[this.selectedIndex].value)>
<option value="" selected>省份</option>
<%
Set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from provinceandcity where fid=0"
rs.open sql,conn,1,1
do while not rs.eof
response.write"<OPTION value="&rs("id")&">"&rs("province_city")&"</option>"
rs.movenext
loop
rs.close
%>
</select>
<span id="load100"></span>
<span id="ccapital">
<select name=capital onchange=GetCity(this.options[this.selectedIndex].value)>
<option value="" selected>地级市</option>
</select>
</span>
<span id="load200"></span>
<span id="ccity">
<select name=city>
<option value="" selected>县级地区</option>
</select>
</span>
</TD>
《分页面一》二和一类似
getcapital
<!--#include file="../conn/conn.asp" -->
<%
capitalid=request.QueryString("capitalid")
set rs=server.createobject("adodb.recordset")
sql="select * from provinceandcity where fid="&capitalid
rs.open sql,conn,1,1
if not rs.eof then
do while not rs.eof
aa=aa&"<option value="&rs("id")&">"&rs("province_city")&"</option>"
rs.movenext
loop
rs.movefirst
set rs2=server.createobject("adodb.recordset")
sql="select * from provinceandcity where fid="&rs("id")
rs2.open sql,conn,1,1
do while not rs2.eof
bb=bb&"<option value="&rs2("id")&">"&rs2("province_city")&"</option>"
rs2.movenext
loop
end if
rs.close
set rs=nothing
rs2.close
set rs2=nothing
conn.close
set conn=nothing
%>
<script>
parent.ccapital.innerHTML="";
parent.load100.innerHTML="<select name=capital onchange=GetCity(this.options[this.selectedIndex].value)><%=aa%></select>";
parent.ccity.innerHTML="";
parent.load200.innerHTML="<select name=city><%=bb%></select>";
</script>