The CreatorCon Call for Content is officially open! Get started here.

iFrame UI Action Redirect Problem

markmmiller09
Kilo Expert

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:

main_page.jpg

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

8 REPLIES 8

Not the iframe buster checkbox but the Frame buster Checkbox for your Main Page .



Capture.JPG


Sorry I meant Frame buster, not iFrame.



This did not work for me. I am still getting an iFrame redirect within the main page.


Please check following thread


Redirect in ESS when Catalog is submitted


simpleQubs
Tera Contributor

Hi All,

I have the same problem. I used iframe to display knowledge page'$knowledge.do'. when I'm submitting the form its redirecting to '$knowledge.do' with all banner and all similar to image.

Any one know how to stop this?

simpleQubs_0-1694754799360.jpeg