工作共遇到一个问题 ,新增页面提交数据 list页面没有更新数据,需要手动刷新数据才会提交展示出来。在页面试过很多刷新的方法都不是很好使,求大神解答。代码如下:
add:的页面代码
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<script type="text/javascript" src="../js/libs/jquery/1.6/jquery.min.js"></script>
<script type="text/javascript"
src="../js/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
<link href="${rootPath}/css/assets/css/bootstrap.css" rel="stylesheet" />
<link href="${rootPath}/css/assets/css/bootstrap-responsive.css"
rel="stylesheet" />
<link href="${rootPath}/css/styles.css" rel="stylesheet" />
<script type="text/javascript">
function addHospitalSave() {
hospitalform.submit();
editHospitalClose();
}
function editHospitalClose() {
$("#editHospitalClose", window.parent.document).click();
}
</script>
<body style="background: none;" >
<div>
<div id="content" class="white"
style="margin-left: 20px; margin-right: 20px">
<div class="bloc">
<div class="content">
<form action="addHospitalSave" method="get" id="hospitalform">
<table class="table table-bordered table-font">
<tbody style="border: 1px;">
<tr>
<td>姓名:</td>
<td><select name="hospital_user_id" style="width: 159px;">
<option value="">-请选择-</option> <#list lstName as name>
<option value="${name.id}">${name.cus_name}</option> </#list>
</select></td>
list的页面
<!DOCTYPE html>
<html>
<head>
<title>门诊记录</title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<script type="text/javascript" src="../js/libs/jquery/1.6/jquery.min.js"></script>
<script type="text/javascript"
src="../js/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
<link type="text/css" rel="stylesheet" href="../css/ht/css_body.css"></link>
<link href="${rootPath}/css/redmond/jquery.ui.theme.css"
rel="stylesheet" />
<link href="${rootPath}/css/redmond/jquery-ui.css" rel="stylesheet" />
<link href="${rootPath}/css/redmond/jquery-ui.min.css" rel="stylesheet" />
<link href="../css/assets/css/bootstrap.css" rel="stylesheet" />
<link href="../css/assets/css/bootstrap-responsive.css" rel="stylesheet" />
<link href="../css/styles.css" rel="stylesheet" />
<script type="text/javascript">
var showList;
function openWin(path){
showList = this.$("<div region='center' style='overflow:hidden'><iframe width='100%' height='100%' frameborder='0' target='_blank' src='"+path+"'></div>");
showList.dialog({id:"showList", modal: true, title: "门诊记录", width:850,height:620});
}
function editHospitalClose(){
showList.dialog('close');
}
function delHospital(){
var chk_value =[];
$('input[name="chkHospital"]:checked').each(function(){
chk_value.push($(this).val());
});
if(chk_value.length==0){
alert('你还没有选择任何内容!');
}else if(confirm('删除的数据无法恢复!确定要删除吗?')){
window.location.href="${rootPath}/hospital/delHospitalSave?ids="+chk_value;
}else{
return false;
}
}
function query(){
queryForm.submit();
}
</script>
</head>
<body>
<div id="left_layout">
<div class="page-heading">
<h2 class="page-title muted">