模态窗口提交action直接返回父页面
来源:互联网 发布:it外包平台 编辑:程序博客网 时间:2024/06/05 19:53
(1)父页面调用模态窗口的方法和设置付页面的重新加载时间方法
//模态窗口
function execlImport(){
var feature = "dialogWidth:800px;dialogHeight:500px;scroll:yes;status:no;help:no;center:1";
var win=window.showModalDialog("assistmanage/dutymanage/dutyplanmanage/chooseExecl.jsp",window, feature);
}
//设置重新加载时间
function reload123(){
setTimeout("reload3()",4000);
}
//重新加载页面
function reload3(){
location.reload(true);
}
(2)
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page contentType="text/html; charset=utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base target="_self" />//不弹出新页面
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>北京市残疾人联合会</title>
</head>
<script src="js/common.js"></script> <script>
function insertinsertExeclDutyPlan()//模态窗口调用action,调用完action 关闭该窗口,并重新加载父页面
{
var file=document.getElementById("fileId").value;
if(file.match(/\.(xls)$/i)==null)
{
alert('文件格式错误!只能为xls格式!');
}
else
{
insertExeclDutyPlanForm.action="insertExeclDutyPlan.action";
insertExeclDutyPlanForm.submit();
var VarObject=window.dialogArguments;//调用父页面的重新加载函数
VarObject.reload123();
window.close();
}
}
</script>
<style type="text/css">
<!--
.exportwrap {
width: 480px;
height: 100%;
margin: 0 auto;
margin-top: 100px;
}
.choose {
width: 100%;
height: 100%;
padding: 10px;
padding-left:15px;
margin: 10px 0;
border: 1px solid #CACACA;
background: #F4F4F4;
}
.line {
height: 32px;
line-height: 32px;
margin-bottom:5px;
}
#file_name {
border: none;
height: 22px;
}
.button {
width:50px;
height:24px;
}
span.ttip {
color:#999; font-size:12px;
}
-->
</style>
<body style="background:none">
<div class="exportwrap">
<form name="insertExeclDutyPlanForm" method="post" action=" insertExeclDutyPlan.action" enctype="application/x-www-form-urlencoded" onSubmit="return false;">
<s:hidden name="returnURL"/>
<div class="choose">
<div class="line" >
选择上传文件:
<input id="fileId" name="upload" size="20" type="file" class="pInput" />
</div>
<label>
<div class="line" align="center">
<input type="button" name="button" class="button" id="button" value="导入" onclick="insertinsertExeclDutyPlan()" />
<input type="reset" name="button2" class="button" id="button" value="取消" onclick="window.close()" />
</div>
</label>
</div>
</form>
</div>
</body>
</html>
- 模态窗口提交action直接返回父页面
- Spring3MVC提交弹出窗口表单后,自动返回父窗口的列表页面
- 模态窗口返回值给当前窗口页面
- 多层模态窗口showModalDialog页面提交及刷新
- action返回原页面
- struts2 提交表单后,不走action中的方法,直接返回input
- struts2 提交表单后,不走action中的方法,直接返回input
- 后台直接返回页面
- 模态窗口提交
- 拦截action直接进入页面
- action提交到jsp页面
- 模态窗口,提交时页面刷新弹出新的页面
- 模态窗口表单提交刷新父窗口问题
- IE8下struts2 采用ajax提交表单,返回json字符串,解析不了,直接保存json字符串。提示下载action.
- select中取得action返回的直接
- Struts2.0中Action直接返回字符串
- Struts2.0中Action直接返回字符串
- 模态窗口提交表单
- 雁过也,月满西楼
- Erlang垃圾回收机制
- 网站优化 14条--雅虎十四条优化原则
- Oracle SQL优化笔记一
- JavaScript About Popup
- 模态窗口提交action直接返回父页面
- iOS 开发,用 NSInvocationOperation 和 OperationQueue 做多线程操作
- Dev-C++ 4.9.9.2版本下载
- 电脑前的正确姿势
- Hadoop 单机部署与eclipse开发
- 从第一个汉字开始分割字符串2012-9-21
- myeclipse 安装svn
- 查看当前ooo文档类型的宏
- C# DataTime Format