Redirect to external link trying to redirect parent window on my website

  • Profile Image
    robert.sedovsek
    Asked on December 02, 2019 at 01:16 PM

    Dear Sir/Madame,

     

    I've tried to use "Redirect to external link" feature for a "Thank you page", but the issue I've encountered is that it is trying to redirect a window.parent, not the iFrame where the form is being rendered.

     

    Is there any control over this?

     

    Thanks in advance,

    Robert.

  • Profile Image
    Welvin
    Answered on December 02, 2019 at 05:53 PM

    Hello Robert,

    Please try not to put the embed codes of the form into an iframe to see if that will work. Or try our default embed option.

    https://www.jotform.com/help/34-Embedding-a-Form-to-a-Web-Page

  • Profile Image
    robert.sedovsek
    Answered on December 02, 2019 at 07:11 PM

    Hey Welvin,


    Thanks for your fast response.

    Unfortunately I cannot change the way the form is embedded, but I do have a control on what is served on that URL, which is opened in an iFrame.

    Which means I can only do an default embed within an iFrame option, but then I don't have an option to embed a JavaScript code I would like to add to the JotForm – this is the primary reason for using JotForm's "Source code" embed options.


  • Profile Image
    jherwin
    Answered on December 03, 2019 at 12:22 AM

    Sorry, but I don't completely understand your requirements. It will help us provide you with the appropriate workaround/suggestions if you can elaborate further on what you wanted to do using the form.

  • Profile Image
    robert.sedovsek
    Answered on December 03, 2019 at 02:44 AM

    jherwin, hi.


    So, here's the recordings:

    http://g.recordit.co/zmxsYVUwgO.gif


    After I fill-in the form, the form is set to redirect to a specific HTML page.

    As you can see in the attached video, the form is trying to redirect a parent window (which it can't, for security reasons), not just the form.

  • Profile Image
    jherwin
    Answered on December 03, 2019 at 04:18 AM

    I tested your webpage and here is what happened on my end:
    1575364563test submission1.gif
    Please try adding "allow-forms allow-popups allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation" to the embed code and see if that will fix the issue in the redirection.