- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2016 02:10 AM
There is a Cancel button on record producer which appears if we select the "Can cancel" checkbox.
I want the user to be redirected to a certain link when the "Cancel" button has been clicked. So far I have been unable to find from where the code of the cancel button is coming.
Do help me out.
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2016 03:34 AM
Yes, window.open with "_parent" option is redirecting to another page.
cancel_button.setAttribute("onclick","window.open('https://www.google.com','_parent');return false;");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2016 02:44 AM
Seems no other way through standard. If this record producer is created through catalog item, you can use "Catalog client scripts". Create a new catalog client script, select corresponding catalog item, implement onLoad event. In the onload event, you can write script like below.
function onLoad() {
//Type appropriate comment here, and begin script below
cancel_button.setAttribute("onclick","location.assign('your url');return false;"); |
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2016 02:55 AM
It is not working. After clicking on cancel button all I see is a blank screen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2016 02:58 AM
Hi Sidarth,
In that "your url" place, put the URL you want user to redirect to. Even then it it didn't work, put a sample alert before the location.assign() statement.
Thanks
Rami Reddy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2016 03:00 AM
I already tried both things. Alert is coming but the page is not redirecting to the URL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2016 03:07 AM
Can you check URL is correct?
Following statement is taking me to Incident list on click of CANCEL button.
cancel_button.setAttribute("onclick","location.assign('incident_list.do');return false;");