How to open the link within the same tab/window, but outside of iframe?

  • Profile Image
    Jotform User
    Asked on August 24, 2015 at 01:07 PM

    I have a jotform in our website using the "embed" javascript code (which creates an iframe). In the form I've used a "Text" block which contains a hyperlink to a different page on our site. By default, when the user clicks the hyperlink, it opens inside the jotform iframe, but I want it to open in the top level of the window.

    I tried to use the "edit HTML" option of the Text block to add an attribute to the link of . However in the live version of the site, that attribute is apparently stripped by jotform and the link continues to open inside the iframe.

    My work-around for now is to use the use the Text widget to edit the HTML link and set it to target "New Window", but I don't really want a new window. 

    Please advise.  

  • Profile Image
    david
    Answered on August 24, 2015 at 03:06 PM

    Hi,

    Target attributes, other than _blank and _self, will be stripped when editing the form after they are added.  Switching from using the iFrame to the Javascript embed method is the only way to allow for links within the form to open in a new tab, rather than in the frame or a new window.  It looks like you have already done so.

    There are a couple workarounds described in this thread:

    http://www.jotform.com/answers/359899-target_parent-doesn-t-work-in-HTML-widget

    However, there is no direct way to do so.