0
我在页面上有一个网格。当我点击行 - 项目数据显示在对话框(jQuery的对话框UI插件)内的项目数据编辑窗体。 问题是在点击对话框“保存”按钮后,用新的用户输入从html中获取数据项。 这里是我的代码:与jQuery模板插件的问题
$('#OutLookAccountsGrid').on('click', 'span.btnOutlookAccountEdit', function() {
//getting data from grid row
var account = $(this).tmplItem().data;
//populating edit template with data
var tbl = $('#outlookaccountEditFormTmpl').tmpl(account);
//displaying edit form inside dialog
tbl.dialog({
modal: true,
width: 400,
buttons: {
"Yes": function() {
var $this = $(this);
//PROBLEM!!! PROBLEM!!! PROBLEM!!!
//want to get values from user, but instead getting old values
//populated from grid row
var data = $.tmplItem(this).data;
//...
//want to send tmplItem with new values throught ajax as data param
//...
}
}
})//end of dialog
})
是有可能得到的对象与新的价值?