Reputation: 586
in jquery dialog i am only allowed just a single button within a dialog. i want two separate button in this dialog
Script
<script type="text/javascript">
$("[id*=btnclosejob]").live("click", function() {
$("#dialog").dialog({
title: "Job Close?",
buttons: {
Close: function() {
$(this).dialog('close');
}
}
});
return false;
});
</script>
HTML
<asp:Button ID="btnclosejob" runat="server" Text="Close Job" />
<div id="dialog" style="display: none">
Are You Sure You Want to Close this job
</div>
Result
(with just single button "Close" but i want two separate button 1st for Action and 2nd for close the dailog)
when i click ok button it should redirect to other page
Upvotes: 0
Views: 3501
Reputation: 7653
just add another button with comma?
$("[id*=btnclosejob]").live("click", function() {
$("#dialog").dialog({
title: "Job Close?",
buttons: {
"Close": function() {
$(this).dialog('close');
},
"OK": function() {
window.location = YOUR_URL;
}
}
});
return false;
});
You can have as many buttons as you wish.
Upvotes: 5