Is it possible to have a link in the jquery dialog box which calls a javascript function? something like this –
var msg-dialog = $('#dialog-msg');
msg-dialog .html("Please click < a href='javascript:void(0)' onclick='javascript:reload();'>here</a> to reload.");
msg-dialog('open');
function reload() {
// do something.
alert('test');
}
The link shows up in the dialog just fine but clicking it doesn’t do anything. What am I missing? I also want to close the dialog in the function.
Assuming you have the appropriate libraries, this will work right out of the box: