JQUERY UI Dialog Form is losing buttons actions at close event
first my code:
var form = $("#f开发者_开发知识库orm_usr");//An empty div to load an html fragment
var url = (rol==1)?"/page/form1.php":"/page/form2.php";
form.load(url);
form.dialog({
autoOpen: false,
open: validator,
close: cleanner,
buttons { Ok: save_function, Cancel: function(){$(this).dialog("close")}}
});
$("#btn_open").click(form.dialog("open"));
My problem here is the assigned functions to events and Buttons only work the first time the dialog is opened.
Any advice would be apreciated. nt: Sorry about my english
buttons {
Ok: function() { save_function },
Cancel: function(){$(this).dialog("close")}
}
Does this make it work? :)
精彩评论