So originally we were trying to get to display "Thank You...." in the frame of the iFrame but we've run into SSL certificate issues where it's not set up in our Marketo instance but it is set up on our website so it's calling https when the page is still http. So I was trying to find a work around in the meantime until we can get our certificate set up.
I set the external URL in the form itself, not the landing page.
Hi Kerry,
As your web site in on https, it is strongly recommended that you do the same for your Marketo instance, for multiple reasons. And one of them is that it will solve your problem
-Greg
Yes we implementing https on our Marketo instance. It's in process. Like I said, I was just looking for a temporary solution because right now our Contact Sales form gives you a blank page within the iframe when you submit. Not ideal.
Hi Kerry,
You could use a Form 2.0 api JS code to hide the form and replace the follow-up page with a simple message.
Look here: Forms 2.0 » Marketo Developers The first example is exactly about this:
MktoForms2.loadForm("//app-sjst.marketo.com", "785-UHP-775", 1057, function(form) {
// Add an onSuccess handler
form.onSuccess(function(values, followUpUrl) {
// Get the form's jQuery element and hide it
form.getFormElem().hide();
// Return false to prevent the submission handler from taking the lead to the follow up url
return false;
});
});
-Greg
Do these two domains share a parent domain (as pages.example.com and www.example.com share example.com)?
If so, this is quite easy.
In the main document:
<script>
try { document.domain = 'example.com' } catch(e){};
</script>
On your Marketo LP:
<script>
MktoForms2.whenReady(function(form){
form.onSuccess(function(vals,tyURL){
try { document.domain = 'example.com' } catch(e){};
self.parent.document.location = tyURL;
return false;
});
});
</script>
This worked perfect! Thank you.
Thanks for all your input. I'm still very green with Marketo (taking Foundational Training next week) so I didn't realize that I had to change the redirect on both the Form Template AND the Landing Page that the form was on. I was only changing it on the Form Template.
Hi Kerry,
In fact you do not need to do both.
-Greg