form submit to _blank | Community
Skip to main content
Colby_Dix
New Participant
August 26, 2014
Solved

form submit to _blank

  • August 26, 2014
  • 13 replies
  • 4384 views

So I have a landing page that's a rather simple form that i am embedding into an iframe within a wordpress post. it looks good.

When you hit 'submit' it triggers an automatic link to a pdf, which unfortunately opens up in the iframe. that doesn't look good. 

Any advice I've tried to find on this has broken links or no info on the jquery code necessary. Any help is appreciated!

Colby

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Colby_Dix

I figured it out, sort of. The key is to put this into the html window:

<base target="_blank" />


And then , boom, it's working in chrome at least. Not working reliably in IE...
 

13 replies

August 26, 2014
Good point. Could you please post a link to the page? 

It will require a little bit of custom JavaScript. Just need to take a look at the page to see what needs to be changed. 
Colby_Dix
Colby_DixAuthor
New Participant
August 26, 2014
there is no href in this case, it's using the marketo form submit button to redirect to the pdf. it's not a 'link' per se. to clarify it's the 'follow up url' in the form that links to the pdf.
ooooh shiny.
August 26, 2014
If you change the link to download your PDF to this format, it will redirect the whole page to the PDF:

"<a href="http://example.com/example.pdf" target="_top">Download PDF</a>"

This link structure should work because "_top" target is specifying the window object of the page at the top of the frames hierarchy.