- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2022 03:31 AM
How to create a pop up window in portal which opens up on click of a button?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2022 03:33 AM
Hi Surpiya,
Please refer below reference url which explains the spModal class which is essentially what you need. Apart from this, you can also add modal popups using bootstrap classes.
https://developer.servicenow.com/dev.do#!/reference/api/quebec/client/SPModal-API
Code example:
// HTML template
<button ng-click="c.onAlert()" class="btn btn-default">
Alert
</button>
// Client script
function(spModal) {
var c = this;
c.onAlert = function () {
spModal.alert('How do you feel today?').then(function (answer) {
c.simple = answer;
});
}
}
Please mark correct/helpful if applicable.
Regards,
Shubham
Shubham Tipnis
ServiceNow Enthusiast
⭐️ 3x Rising Star (2022–2024) – ServiceNow Community
Sharing insights, use cases & real-world learnings from the Now Platform
Always learning. Always building.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2022 03:33 AM
Hi Surpiya,
Please refer below reference url which explains the spModal class which is essentially what you need. Apart from this, you can also add modal popups using bootstrap classes.
https://developer.servicenow.com/dev.do#!/reference/api/quebec/client/SPModal-API
Code example:
// HTML template
<button ng-click="c.onAlert()" class="btn btn-default">
Alert
</button>
// Client script
function(spModal) {
var c = this;
c.onAlert = function () {
spModal.alert('How do you feel today?').then(function (answer) {
c.simple = answer;
});
}
}
Please mark correct/helpful if applicable.
Regards,
Shubham
Shubham Tipnis
ServiceNow Enthusiast
⭐️ 3x Rising Star (2022–2024) – ServiceNow Community
Sharing insights, use cases & real-world learnings from the Now Platform
Always learning. Always building.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2022 03:37 AM
Hi,
Thank you for the quick response.
Regards,
Supriya