aui / artDialog

经典的网页对话框组件

Home Page:http://aui.github.com/artDialog/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught TypeError: Cannot read property 'find' of undefined

wren0212 opened this issue · comments

# I change statusbar in a post method callback,and chrome shows this:

Uncaught TypeError: Cannot read property 'find' of undefined
b.extend.
$ @ dialog-plus-min.js:2
b.extend.statusbar @ dialog-plus-min.js:2
(anonymous function) @ base.js:75
jQuery.Callbacks.fire @ jquery.js:3148
jQuery.Callbacks.self.fireWith @ jquery.js:3260
done @ jquery.js:9314
jQuery.ajaxTransport.options.send.callback @ jquery.js:9718_

belowis my code:

var d = dialog({
title:'编辑',
content: "",
okValue:'确定',
ok: function () {
var that=this;
$.post(
'url',
{},
function(result){
that.statusbar(result.message);
return false; }
} );
},
cancelValue:'取消',
cancel:function(){
this.close().remove();
return false;
}
});
d.showModal();

I didn't close&remove the dialog when click the ok button only the post method returns I will do that

finally I resoled this by using button definded by myself ,
I guess this happens because of the okbutton & cancel button has close&remove logic before