因业务需要,在模式对话框里也要实现分页,网上搜到有两个技巧:
1. if you are using IE5.5 or 6, try to add this line to your code
<base target="_self">
2. or use a frameset or IFRAME to house your test.jsp
第一点,我试了,貌似不行,还有IE版本限制,我就放弃了,如果有网友知道的顺便跟小弟说一下,呵呵。
我是按第二点做的:
showModalDialog('test_frame.jsp',"")
在'test_frame.jsp'里面加上
<frameset><frame src="<%= linkto %>" name="ifm" scrolling=no noresize></frameset>
在你的分页JS方法中加上window.location.href="你要转到的页面或ACTION",就可以了。
<%@ page language="java" pageEncoding="GB2312"%>
<%
//该页面是用来模式对话框分页
String linkto = request.getParameter("linkto");
linkto=linkto.replace("|", "&");//这里是防止&参数过来时得不到值
String title=request.getParameter("title");
title=new String(title.getBytes("ISO-8859-1"),"gbk");
%>
<html>
<head>
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<title><%= title %></title>
<link rel="stylesheet" href="<%=request.getContextPath()%>/include/css/style.css" type="text/css">
</head>
<frameset rows="100" frameborder=no border="0" framespacing="0">
<frame src="<%= linkto %>" name="ifm" scrolling=no noresize>
</frameset><noframes>
<body>
</body>
</noframes>
</html>
分享到:
相关推荐
网上找了好几个小时没有找到解决办法。最终还是自己解决了。...这样做就是用超链接把返回url转递到用showModalDialog打开的新窗口中,当showModalDialog返回时指到转来的url,最终不刷新父窗口。......
showModalDialog刷新窗口的例子
div层实现showModalDialog
showModalDialog使用例子,父窗口向子窗口传递值,子窗口设置父窗口的值,子窗口关闭的时候返回值到父窗口 纯js 应用广泛 应用广泛
DIV 实现showModalDialog效果,内加树形效果
1> window.showModalDialog()采用JS原理实现,同时父窗口不可操作,window.open()采用新创建一个窗口,同时父窗口可操作; 2> 父窗口与子窗口传递值的方式也有所不同,在子窗口中操作父窗口也语法也不同,分别为var...
本文实例讲述了JS中showModalDialog关闭子窗口刷新主窗口用法。分享给大家供大家参考,具体如下: 网上找了好长时间 大都是window.opener.location.reload(),等等 都不是我想要的 最后终于发现了一个 想知道的就往下...
sharepoint 2010 弹出模式窗口showModalDialog并返回值
介绍showModalDialog和showModelessDialog实现模态窗口的使用心得
做项目时,碰到了前台页面需要向弹出框传值并且需要使用弹出框的返回值的需要,一开始使用的prompt...发现ie浏览器时,prompt()弹出框的位置会固定在左上角。后来使用window.showModalDialog(url,params,pos)方法 解决
window.open()和window.showModalDialog(),并解决了showModalDialog()弹出窗口中列表分页的问题。 提供了三个JS方法: (1)showWindow(sURL, width, height); (2)showWindowInPage(pageUrl, params, title, ...
Selenium目前没有提供对IE模态对话框(即通过showModalDialog方法打开的弹出对话框)的处理。原因在于,模态对话框会将父页面的 JS挂起,直至对话框处理完毕才会继续执行父页面JS。因为Selenium的底层实现是基于JS的,...
window.showModalDialog以及window.open用法简介 父子窗口传值
ShowModalDialog父窗体向子窗体传值
window.showModalDialog以及window.open用法简介
showModalDialog参数传递和获
NULL 博文链接:https://crabdave.iteye.com/blog/269954
通过实例,详细说明了showModalDialog弹出网页窗口的应用。
showModalDialog和showModelessDialog使用心得
This is a `window.showModalDialog()` shim using a modal HTML5 `<dialog>` element and ECMAScript 6 Generators. It was tested in the latest Google Chrome with the *Enable Experimental JavaScript* flag ...