Open a new tab after form submission | Community
Skip to main content
February 11, 2013
Solved

Open a new tab after form submission

  • February 11, 2013
  • 11 replies
  • 4107 views
Is there any way to open a new tab with a form submission?  We have specific needs to track conversion that use a few different ways.  I know the Marketo conversion works if we stay on the same page, but a company we work with requires a different page to open to track.  Instead of forcing that person to go to a different website or refresh the current website, we'd like to open a new tab with the different website, enabling our partners to track conversion but keeping the user on the same page.  Can this be done?  If so, how?
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
Hi Kymberlee,

Quick update. The script below can be added as an HTML element in Marketo Landing Page, similar to my previous suggestion. However, this one is better because it will only open the new tab/window if no error messages are displayed when the form is validated for things like required fields or valid email address (which are built into many landing page templates):

<script type="text/javascript">
$jQ('#mktFrmSubmit').click(function() {
var mktErrorMsgContent = $jQ('.mktFormMsg').html();
if (mktErrorMsgContent != 'This field is required') {
window.open('http://www.marketo.com'); //<-- Change this to your url
}
});
</script>

I hope this addresses your objective.

Reade Triolo

11 replies

February 11, 2013
There is no way to do this with existing functionality in Marketo, but possibly some Javascript code on the page could open the follow-up page in another tab.