关于showModalDialog的使用,急!!!

lhcoolhacker 2003-05-13 09:27:58
我在使用showModalDialog时,在弹出窗口的页面中有四个下拉菜单,第一个是从数据库中取出显示,第二个希望当第一个点击变化时接受传递的参数从数据库中读取相应的数据显示,可这是,就会弹出另外一个窗口,我不希望其弹出另外的窗口,而且要能实现数据的显示,不知道如何才能实现?
...全文
48 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
dhluo 2003-05-13
  • 打赏
  • 举报
回复
//////////////主文件
<script language="JavaScript">
function AddList(inputtxt)
{
var str1 = "abdfasdfa asfd asfd";
if(self.event.keyCode==13)
{
document.frames["hiddenframe"].location.replace("freshhosp.asp?keyword=" + inputtxt.value);
return false;
}
}
</script>
<body>
<form>
<select name=time1 onclick="AddList(this)"
<option value="1">添加列表1</option>
<option value="2">添加列表2</option>
</select>

<select name=time2 style="width:80">
<option value=""></option>
</select>
<iframe id=hiddenframe width=0 height=0 src="freshhosp.asp"></iframe>
</body>


//////////freshhosp.asp
//////////这个文件是我的实例的原版拷贝,你可以参考着看。
<html>
<head>
<title>fal asdf</title>
<script language="JavaScript">
<!--
<%
if request("keyword")<>"" then
%>
coll=parent.document.search.time2;
while(coll.options.length>0)
{
for(j=0; j< coll.options.length; j++)
{
coll.remove(0);
}
}

<%
response.write request("keywork")
sql="select * from 省名 where 省名称 like '%"&request("keyword")&"%'"
set state=strconn.execute(sql)
do while not state.eof
%>
oOption = parent.document.createElement("OPTION");
oOption.text="<%=state("省名称") %>";
oOption.value="<%=state("省编号")%>";
coll.add(oOption);
<%
state.movenext
loop
state.movefirst
'if state.recordcount>0 then
%>
oOption = parent.document.createElement("OPTION");
oOption.text="重新查询";
oOption.value="";
coll.add(oOption);
<%
'end if

set state = nothing
end if
%>
-->
</script>
</head>
<body>
<table cellspacing=0 cellpadding=0>
<tr>
<td >
</td>
</tr>
</table>
</body>
</html>
Reker熊 2003-05-13
  • 打赏
  • 举报
回复
http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=2014
lhcoolhacker 2003-05-13
  • 打赏
  • 举报
回复
能不能详细点,在哪里放?是第一个,还是第二个?那又如何接受参数呢?
Gorgee 2003-05-13
  • 打赏
  • 举报
回复
用xmlhttp,很方便的
fason 2003-05-13
  • 打赏
  • 举报
回复
里面放iframe

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧