(1)
/* $('#detailDataForm').toForm('submitForm');
submitForm.form('submit',
{url : "<emp:url action='updateSBchRecord.do'/>",
success :function(data) {
try {
var jsonstr = eval("(" + data + ")");
} catch (e) {
EMP.alertException(data);
return;
}
var flag = jsonstr.flag;
var message = jsonstr.message;
if (flag == 'success') {
EMP.alertMessage(message);
window.parent.doSearch();
window.parent.EMP.closewin();
} else {
EMP.alertMessage(message);
}
}
}); */
(2)
$.ajax({
type :
"POST"
,
dataType :
"html"
,
url :
'<emp:url action="updateSBchRecord.do"/>'
,
data : $(
'#submitForm'
).toJsonData(),
success :
function
(data) {
try
{
var
jsonstr = eval(
"("
+ data +
")"
);
var
flag = jsonstr.flag;
var
message = jsonstr.message;
if
(flag ==
'success'
) {
EMP.alertMessage(message);
window.parent.doSearch();
window.parent.EMP.closewin();
}
else
{
EMP.alertMessage(message);
}
}
catch
(e) {
EMP.alertException(data);
return
;
}
}
});
把第一种写法改为第二种写法,查找的原因为xml中缺少一层标签
<
output
class
=
"com.ecc.emp.data.KeyedCollection"
>
如下图: