I would say something like this:
<a href="mylink.html" id="dialogLink">Link</a>
And using unobtrusive javascript (using jQuery):
var link = $('#dialogLink'); link.click(function() { $(this).dialog({ buttons: { "Ok": function() { $(this).dialog('close'); window.location.href = link.attr('href'); } } }); return false; });
You delete the link through javascript, and only if the user clicks the "OK" button in the dialog box does the window location change.
source share