- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2022 09:01 AM
Is there a way to add a link/hyperlink to an alert popup box?
alert("Please visit https://siteaddressgoeshere.com for more information");
I have already tried using
alert('<p>Please Visit <a title="Site Address" href="https://siteaddressgoeshere.com">Site Address</a> for more information</p>');
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2022 09:09 AM
I don't think we can do this with an alert but you can try using this
altAlert('<p><span style="font-size: 12pt; color: red;">Please Visit <a title="Site Address" href="https://siteaddressgoeshere.com" target="_blank">Site Address</a> for more information</span></p>');
function altAlert(str) {
if (typeof spModal != 'undefined') { //for portal
spModal.open({
message: str,
title: 'Alert',
buttons: [{label: 'OK', primary:true}
],
});
} else { //for platform
var gm = new GlideModal();
gm.setTitle('Alert');
gm.renderWithContent(str);
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2022 09:09 AM
I don't think we can do this with an alert but you can try using this
altAlert('<p><span style="font-size: 12pt; color: red;">Please Visit <a title="Site Address" href="https://siteaddressgoeshere.com" target="_blank">Site Address</a> for more information</span></p>');
function altAlert(str) {
if (typeof spModal != 'undefined') { //for portal
spModal.open({
message: str,
title: 'Alert',
buttons: [{label: 'OK', primary:true}
],
});
} else { //for platform
var gm = new GlideModal();
gm.setTitle('Alert');
gm.renderWithContent(str);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2022 09:14 AM
Thank you, this works perfectly