在iframe的页面里隐藏一个form,你新打开的窗口的查询参数传到他里面,不就行了
解决方案 »
- 分享·CSDN 快速结贴给分 BookMarkLet
- 浏览器版本
- Automation 服务器不能创建对象
- showModalDialog的问题
- 请大家帮忙推荐javascript书籍
- 【请教】window_onload_runalways()是什么意思?
- 框架页的问题,,搞得我一个头两个大。。。希望各位帮帮忙
- 如何不显示窗口的关闭,最大化和最小化按钮?
- IE5与IE6支持不同版本的JS,怎么办啊?天哪!
- 怎么将一个层随着滚动条的拖动而始终定位在浏览器中央,而可以手工拖动???
- 难题:怎样屏蔽window.showModalDialog 弹出窗口右上面的 叉叉 ?
- 请问如何使两个图片固定放在页面的两边,并随着页面滚动
to kingdomzhf(旭日东升): 拜托阁下认真阅读我对问题的描述,如果认为什么地方我没说清楚,尽管告诉我! to 大家: 最好能给我写段贴切的例子,我刚刚接触"瘦客户端"开发,JavaScript方面的知识很薄弱,如果就是那么简单一说,我很难理解要如何去做.
如果加上1)小点的想法,那么这样写可以么? onclick='javascript:document.queryform.submit();self.opener.frames[simple].document.reload();self.opener=null;self.close();' 实在不行我就放弃了吧,都在一个浏览器窗口里做算了,所有的问题都迎刃而解了!
写个自动刷新的函数,然后onclick调用不就OK了吗?
var limit="0:01
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
self.opener.top.frames[simple].document.reload();
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+"分"+cursec+"秒后重刷本页!"
else
curtime=cursec+"秒后重刷本页!"
window.status=curtime
setTimeout("beginrefresh()",1000)
}
}
to longshenwang(清一色!一条小青龙): 没反应
to AgathaZ(游弋的小鱼); self.opener.top.frames[simple].document.reload(); //这句没有起作用
请问大家: 如果我放弃了上述想法,所有的事情都在一个浏览器窗口里做,又该怎么做呢? 就是: 原来在子窗口里的那个查询表单,现在我把它放到主窗口(main.jsp)的右方, 就是放到<iframe name=detail>这个框架里,添完查询条件后,我点"提交"按钮,把查询结果提交到<iframe name=simple>这个框架里,同时<iframe name=detail> 内容清空,如果不清空,查询结果同样会显示在窗体右方的<iframe name=detail>里. 请问如何做呢?如下可以么? <form action="某某Servlet">
.
.
<input type=submit value="提交" onclick="JavaScript:simple.location.href=/showresult;detail.location.href=about:blank">
</form> 这样可以么????
to xuzuning(唠叨): target="窗口名" ---->[窗口名] 是我要显示概要查询结果的那个<iframe name=simple>么? 也就是"窗口名"=simple ,是这样的么?
现在,在main.jsp里有一个button,如下: <input type="button" value="人要素查询" name="people" style="background-color:#D1D5BA;" onclick="Javascript:detail.location.href='/showcondition'"> 我的期望:
点击后在<iframe name=detail>里出现一个查询用的表单,也就是showcondition.java
但为什么不好使?
如果用超连接就好使,因为<a>标记有一个target的属性,象这样: <a href="controlservlet?action=showcondition&objName=people" target="detail">人要素查询</a>
为了界面美观,我想用<input type="button" value="人要素查询">,请问应该如何做?
请注意以下事实:
p.htm
<iframe name="test"></iframe>
<script>
open("ps.htm");
</script>ps.htm
<form target="test">
<input type=text name=ppp value=123>
<input type=submit>
</form>在弹出的窗口中点击提交,看看原窗口中是什么
to xuzuning(唠叨):
我还有一个问题: 在<iframe name=detail>里有一个下拉框,如下:
<select size=1 name=operation onchange='location=this.options[this.selectedIndex].value' style='width:80px;margin:-1'> <option value='controlservlet?action=associationquery>关联查询1</option> </select>
现在我点“关联查询1”就会得到关联查询结果,我想把结果显示在main.jsp左上角的那个<iframe name=simple>里,又应该怎么做呢?
我查了一下,<select>标记和<option>标记没有target属性, 所以我这样:
<form name=help target=simple> <select size=1 name=operation onchange='location=this.options[this.selectedIndex].value' style='width:80px;margin:-1'> <option value='controlservlet?action=associationquery>关联查询1</option> </select>
</form> 但不好使,请问我应该怎么做呢?
to longshenwang(清一色!一条小青龙) : 能给我写一段示例代码么? 感谢之至。
to longshenwang(清一色!一条小青龙): 哦 to zhfkiller(杀手) : 能帮帮我么? 我现在正在着手解决第三个问题,就是: 在main.jsp的左上方和左下方分别有一个<iframe>标记,他们是: <!-- 显示在页面左上角部位,用于显示概要查询结果 --> <iframe name="simple" src='/showresult'> <!-- 显示在页面左下角部位,用于显示查询动作历史列表 --> <iframe name="history" src='/showhistoryresult'>
我的期望: 在点击<iframe name="simple" src='/showresult'>里的超连接时,<iframe name="history" src='/showhistoryresult'>里记录并显示曾经点击过的“查询动作”,以便进行“历史回朔”查询。 现在“点击动作”我有办法记录下来,并传递给<iframe name="history" src='/showhistoryresult'>里的Servlet--->showhistoryresult.java. 但却没有办法显示。
我在点击<iframe name="simple" src='/showresult'>里的超连接时,做了如下处理: <a href='controlservlet?action=detailquery&detailpara=某个参数' target='detail' onclick='document.frames[history].location.href =/showhistorylist'>
却没有反应,请问我应该怎么做呢? 着急ing...
to longshenwang(清一色!一条小青龙): 谢谢!可是本版老大什么时候来呀?(好象从没见过他回答问题,-_-)
to zhfkiller(杀手) : 听说你是高手,证明自己实力的时刻到了,呵呵~ 拜托帮我看看这个帖子里我曾经提出过的问题,能回答多少就回答多少,拜托!拜托! 答案 ---> 我梦寐以求!
----------
<body>
<div>
<input type=button value="open wnd" onclick="popup()">
<script language="JScript">
function popup(){
var pop = window.open('submit.htm');}
</script>
</div>
<!-- 显示在页面左上角部位,用于显示概要查询结果 -->
<iframe name="simple" src='/showresult'></iframe><!-- 显示在页面左下角部位,用于显示查询动作历史列表 -->
<iframe name="history" src='/showhistoryresult'></iframe><!-- 显示在页面右方,用于显示详细查询结果 -->
<iframe name="detail" src='/showdetailresult'></iframe></body>弹出的窗口提交页面submit.htm
-----------------------
<BODY><P> </P>
<form name=form1 action="\showresult"><input type=submit onclick="window.close()"></form>
<script>window.onbeforeunload = function () {
window.opener.document.frames("simple").location.reload();
};
</script>
</BODY>
http://sourceforge.net/projects/phpmyadmin/
function abc()
{
...
}
在弹出窗口里面可以用window.opener.abc()来启动这个函数
在刷新历史列表那里: 我尝试过如下写法: onclick='javascript:document.frames[history].document.reload();'
onclick='javascript:parent.frames[history].document.reload();' onclick='javascript:document.frames[history].location.reload();'
onclick='javascript:document.frames[history].location.href='/showhistorylist';' onclick='javascript:document.frames[history].location.write(this.href);'
总是报告说:document.frames[history].location 或 parent.frames[history].document 或 document.frames[history].location 这些对象不存在, 这是怎么回事?
<select size=1 name=operation onchange='simplelocation=this.options[this.selectedIndex].value' style='width:80px;margin:-1'>如果你想理顺各frame、iframe的次序,请在主文件里查看document.frames
写得有问题,不是[]号见上面,我的方法试了吗?没有解决不了的问题
不好使啊 to yjgx007(谁是高手):
我查了书,确实是[]号啊