没有合适的资源?快使用搜索试试~ 我知道了~
分页后弹出模态窗口刷新父窗口
需积分: 16 31 下载量 112 浏览量
2008-12-26
17:30:02
上传
评论 1
收藏 2KB TXT 举报
温馨提示
试读
2页
分页后弹出模态窗口刷新父窗口 分页后弹出模态窗口刷新父窗口 分页后弹出模态窗口刷新父窗口
资源推荐
资源详情
资源评论
父窗口中有分页,如点第二页后,选中某项,点编辑,弹出模态窗口,
关闭模态窗口后,父窗口刷新,且保持在第二页:
父窗口:
function showEdit(personId)
{
var value=window.showModalDialog("EditPerson.aspx?personId="+personId,window,"dialogWidth=700px;dialogHeight=700px;scroll:yes");
if(value==true)
{
var pager2=document.getElementById("page2_input");//pager1为分页控件的下拉框
var pageIndex=pager2.options[pager2.selectedIndex].value;//刷新前是哪一页被选中
location.href=location.href;
if(pageIndex>0)
{
pageIndex--;
}
else
{
pageIndex=0;
}
pager2.options[pageIndex].selected="selected";
pager2.onchange();
}
}
<webdiyer:AspNetPager ID="page2" runat="server" Width="60%" HorizontalAlign="right"
PageSize="15" LastPageText="末页" FirstPageText="首页" NextPageText="下一页" PrevPageText="上一页"
ShowPageIndexBox="Always" PageIndexBoxType="DropDownList" CustomInfoHTML="%RecordCount%个记录/%PageCount%页"
CustomInfoTextAlign="Right" ShowCustomInfoSection="Left" CustomInfoStyle="padding-top:4px;"
OnPageChanged="pager2_PageChanged" NumericButtonCount="3">
</webdiyer:AspNetPager>//此控件会生成一个page2_input的下拉框
关闭模态窗口后,父窗口刷新,且保持在第二页:
父窗口:
function showEdit(personId)
{
var value=window.showModalDialog("EditPerson.aspx?personId="+personId,window,"dialogWidth=700px;dialogHeight=700px;scroll:yes");
if(value==true)
{
var pager2=document.getElementById("page2_input");//pager1为分页控件的下拉框
var pageIndex=pager2.options[pager2.selectedIndex].value;//刷新前是哪一页被选中
location.href=location.href;
if(pageIndex>0)
{
pageIndex--;
}
else
{
pageIndex=0;
}
pager2.options[pageIndex].selected="selected";
pager2.onchange();
}
}
<webdiyer:AspNetPager ID="page2" runat="server" Width="60%" HorizontalAlign="right"
PageSize="15" LastPageText="末页" FirstPageText="首页" NextPageText="下一页" PrevPageText="上一页"
ShowPageIndexBox="Always" PageIndexBoxType="DropDownList" CustomInfoHTML="%RecordCount%个记录/%PageCount%页"
CustomInfoTextAlign="Right" ShowCustomInfoSection="Left" CustomInfoStyle="padding-top:4px;"
OnPageChanged="pager2_PageChanged" NumericButtonCount="3">
</webdiyer:AspNetPager>//此控件会生成一个page2_input的下拉框
资源评论
oxch2008
- 粉丝: 3
- 资源: 72
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功