开发者

JQUERY UI Dialog Form is losing buttons actions at close event

开发者 https://www.devze.com 2023-02-19 17:11 出处:网络
first my code: var form = $(\"#f开发者_开发知识库orm_usr\");//An empty div to load an html fragment

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? :)

0

精彩评论

暂无评论...
验证码 换一张
取 消