iFrame UI Action Redirect Problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2015 08:35 AM
I'm working on a CMS site and am running into an issue with the out-of-the-box redirect's for UI actions on forms within iFrames.
I have a CMS page which provides a link of all approvals for the user. When the user clicks on an approval, they are taken to a new page which contains the approval form in an iFrame. The user has the standard UI actions: Update, Approve, Reject, etc. When a UI action is clicked, the out-of-the-box redirect is at the iFrame level, so essentially I am getting the entire previous page within the iFrame and it looks something like this:
I have tried:
- using action.setRedirectURL('my_approvals.do'); within the UI action
- If I use this approach, I am still targeting the iFrame
- using a client onClick function which calls the browser's window.history.back() function
- if I use this approach, then the approval isn't approved/rejected
I would rather not have to go through every UI action that will be used on the CMS site and modify the redirects... I was hoping to use jQuery to select all form buttons and add an event listener to redirect, but I don't think this will work since the ServiceNow Approve function never gets called.
Any ideas?
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2015 04:58 PM
Hi Mark,
How did you bring your lists of approvals and the approval form into iframe?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2015 05:29 AM
Hey Chris,
I used a dynamic block to bring in a list block of records shown below:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<div class="col-xs-3"> <!-- required for floating -->
<!-- Nav tabs -->
<ul class="nav nav-tabs tabs-left">
<li><a href="my_requests.do">My Requests</a></li>
<li><a href="my_incidents.do">My Incidents</a></li>
<li class="active"><a href="my_approvals.do">My Approvals</a></li>
</ul>
</div>
<div class="col-xs-9">
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="my_approvals">
<h2>My Approvals</h2>
<br/>
<g:content_block type="content_block_lists" id="b9ea33d34f8006007b338b8d0210c7b6"/>
</div>
</div>
</div>
</j:jelly>
I added this dynamic block to a page.
For the form, I used a detail block which renders the form automatically.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2015 10:16 PM
Check the Frame buster checkbox form main page and you are done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2015 05:34 AM
Hello Gurpreet,
Checking the iFrame buster box did not work.