I have an ASP.NET MVC (Registration) page. When the page loads, I invoke the Jquery Dialog using Agree and Disagree on this Dialog.
1). How to set the default focus on the "Agree" button ?
2). How to disable the X (Close) icon, which is located in the upper right corner? (So ββthat I do not want the user to just close this dialog).
the code:
$("#dialog-confirm").dialog({ closeOnEscape: false, autoOpen: <%= ViewData["autoOpen"] %>, height: 400, width: 550, modal: true, buttons: { 'Disagree': function() { location.href = "/"; }, 'Agree': function() { $(this).dialog('close'); $(this).focus(); } }, beforeclose: function(event, ui) { var i = event.target.id; var j = 0; } });
Rate your answers.
thanks
source share