How can I pass params to the open event of jquery.ui.dialog?
Hello everyone:
In my project, I want to load a partial view dynamically which will be able to create and edit data.
The dialog can be triggered by create button. Also I want the dialog can be triggered by edit button in a data list.
so I write my code as below:
- $('#editorDialog').dialog({
- autoOpen: false,
- title: 'edit',
- bgiframe: true,
- width: 980,
- position: "top",
- modal: true,
- open: function(event, ui) { //How can I pass params to here.
$('#editorDialog').load('/Business/Order/Edit/', function() {
//do something here
});
},
- buttons: {
"Submit": function() { //do something here},
"Cancel": function() {
$(this).dialog("close");
}
},
- });
In the part which I marked, I want to pass some params such as value of id.
How can I do that?