Styling alerts throughout whole site using dialog boxes
Hi,
I have lots of javascript alerts throughout my site, I need to style them up using a jquery dialog. Can anyone please tell me how I can setup a default dialog and populate it with the alert text?
A typical alert looks like this:
window.alert("text here");
My current dialog looks like this:
$('#sessionTimeout-dialog').dialog({
autoOpen: false,
width: 400,
modal: true,
closeOnEscape: true,
buttons: {
"Log Out Now": function () {
window.location.href = o.logoutUrl;
},
"Stay Connected": function () {
$(this).dialog('close');
}
}
});
Can I set the defaults such as width and close on escape so I don't have to keep adding them for each instance, there are literally hundreds.
Many thanks in advance