Question
What javascript code to execute form submission actions from iframe
I've built a landing page which includes a Marketo form (1.0 not a 2.0 form).
- On the homepage of my site, the user will see a popup window
- In the popup window is where my Martkeo landing page/form will display
Once the user submits the form, I would like the popup window to close and have the user remain on the homepage.
Have any of you experienced this situation?
I've created a javascript tag and placed it on my landing page.
<script> MktoForms2.whenReady(function (form) { form.onSuccess(function (values, url) { window.parent.location.assign(url); return false; }); }); </script>It's not working. What am I missing?