- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2017 04:15 PM
Hi All
I have a UI page on that I added a button like back button which we have OOB on records.
I want that button should behave like OOB button. But I am unable to find any solution for navigating user to previous page.
Any one knows how to achieve this?
Regards,
Sajan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2017 11:32 PM
Hi Sajan,
In a link simply add below on onClick.
<a onClick="window.location=history.back()">Back</a>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2018 09:46 AM
got it : onClick="window.history.go(-1)"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2021 05:57 PM
Hi...seeing this post.
I'm using your script in the HTML of a newly created widget...appears to be working as far as taking me to the previous page. However, when I hold my mouse over "Back", I don't see the hand pointing icon, I see something like a capital "I" bracket looking icon. Is it possible get it to look like a normal link on a webpage?
Am I using this script correctly? I'm trying to use it to create a "Back" button in Service Portal.
Here's my widget script:
HTML:
<div>
<a onClick="window.history.go(-1)">Back</a>
</div>
Client:
api.controller=function() {
/* widget controller */
var c = this;
};
Server:
(function() {
/* populate the 'data' object */
/* e.g., data.table = $sp.getValue('table'); */
})();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2021 10:02 PM
Hi Patric, Try cursor css in HTML section
<div>
<a onClick="window.history.go(-1)" style="cursor: pointer;">Back</a>
</div>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2021 05:52 PM
Perfect, thanks Gurpreet!