- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 06:48 AM
Hi all,
I'm trying to create a very basic widget that displays a button and when pressed will direct the user to another page on the Service Portal.
I have the button, but so far clicking it does nothing so I'm clearly missing some functionality.
HTML Template:
<div class="m-b text-center">
<button type="button" name="link" class="btn btn-primary btn-question" ng-click="c.action('redirect')">Check Validation Status</button>
</div>
Client Script:
var c = this;
c.action = function(redirect) {
var link = '?id=checkvaluationstatus';
top.window.location = link;
}
Any help is greatly appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 07:14 AM
Please try the below changes:
api.controller=function($window) {
var c = this;
c.action = function(redirect) {
var link = '?id=checkvaluationstatus';
$window.location.href = link;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 07:02 AM
Hi @LRhodes ,
You need to add a link-button widget in the portal which will allow you to directly add a link in the instance options.
If my response helped you, please click on "Accept as solution" and mark it as helpful.
- Saloni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 07:14 AM
Please try the below changes:
api.controller=function($window) {
var c = this;
c.action = function(redirect) {
var link = '?id=checkvaluationstatus';
$window.location.href = link;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 07:15 AM
Thanks Dom, this did the trick.