SOLVED

Open a new tab after form submission

Go to solution
Anonymous
Not applicable
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?
Tags (1)
1 ACCEPTED SOLUTION
Anonymous
Not applicable
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

View solution in original post

11 REPLIES 11