Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How to redirect parent page from UI action in iFrame

peter_repan
Kilo Sage

Hi guys,

I have in CMS an iFrame with UI action (it's form of sysapproval_approver record).

After I submit this UI Action I want to redirect my parent page to different URL in server-side script.

Is there a way how to do it?

If I use action.setRedirectURL('<my_page>.do'); it just reload the iframe, not the parent page

-               If I use action.setRedirectURL('my_list.do'); it just reload the iframe, not the parent page

3 REPLIES 3

Not applicable

I think the syntax you want is:



[Edit: this should be correct now]


top.window.location = 'your.url-here.com';


Hi Andrew,



not really, because I need server-side solution, not client side.



Finally, I got workaround.



How to solve it:


- create a UI page with script "<script>parent.document.location.href="my_list.do"</script>"


- in UI Action call action.setRedirectURL("my_ui_page.do");



This workaround will do the trick


Not applicable

I'm glad that worked for you!



if you tick the "client" box in a ui action, you can use client-side script there, as well.