jbox弹出的子窗体进行修改的问题
jbox弹出的子窗体进行修改的问题,我想实现的效果是,在当前列表中(可能是第几页的数据,如当前第3页的第66行)选中某一条记录,弹出子窗体,
修改完后,定位回这条记录。现在用的是jbox插件,如下代码注解中是要解决的问题,请各位大侠给予解决一下,谢谢。
function Edit() {
var _select = $(".checkone:checked");
if(_select)
{
if (_select.length < 1) {
alert("请先选择一条单据进行修改!");
return false;
}
var getPath="<%=ResolveUrl("~/View/info/ReloadEdit.aspx")%>"+"?ID=2;
$.jBox("iframe:"+getPath, {
title: "弹出添加框",
width: 800,
height: 450,
showScrolling: true,
iframeScrolling:'auto',
buttons:{"提交":'ok',"取消":'cancel'},
buttonsFocus:'ok',
submit:function(v,h,f){
var phoneu=null;
debugger;
if(v == "ok"){
/*(1)能否在弹出的页面进行修改处理好后再返回到这里*/
/*(2)如果不用(1)这里是怎么获取到表单的值*/
var name = f.name;
var phoneu = f.phone;
alert(phoneu);
phoneu = f.phone;
var address = f.addressn;
var desc = f.desc;
var url=f.url;
$.post(url,{"jBox.name":name,"jBox.phone":phoneu, "jBox.address":address, "jBox.desc":desc},function(data,status){
if("success" == status){
alert(status);
$.jBox.success("Data Transufal success!","success");
parent.location.reload();
//re locate
}else{
$.jBox.error("Error Transufal", "Error");
return false;
}
});
}
if(v == "cancel"){
alert("已取消!");
alert("已取消");
return true;
}
}
});
}
else
{
alert("请先选择一条单据进行修改!");
}
}
这是弹出子窗体的页面代码:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
name:<input id="name" name="name" type="text" value="name" runat="server"/>
phone: <input id="phone" name="phone" type="text" value="phone" runat="server"/>
address: <input id="address" name="address" type="text" value="address" runat="server"/>
desc: <input id="desc" type="text" name="desc" value="desc" runat="server"/>
url: <input id="url" type="text" name="url" value="ShowTextInfo.aspx" runat="server"/>
</div>
</form>
</body>
</html>
不知这样对否,或还要怎么样处理?
[解决办法]
注意回调 http://blog.csdn.net/linwei_1029/article/details/8720625