javascript - Dynamic Follow Up Page with Marketo Forms -
we using script allows to change follow urls of form dynamically can use same form across multiple assets have different follow pages.
the issue script works when loads form rather bringing in via visual editor. if adjust code per instructions on developer site make work visual editor, stops working.
we need bring form in via editor because have script works on forms loaded in manner. script opens follow page in parent window rather iframe.
can provide suggestions?
here's code script:
dynamic follow url:
<script type="text/javascript">// <![cdata[ mktoforms2.whenready(function(form){ //add onsuccess handler form.onsuccess(function(values, followupurl){ //take lead different page on successful submit, ignoring form's configured followupurl. location.href = "http://solutions.healthcaresource.com/2346-staff-assessment-thank-you.html"; //return false prevent submission handler continuing own processing return false; }); });// ]]>
use document.getelementbyid('iframe_id').src
(given iframe id of 'iframe_id'):
location.href = "http://solutions.healthcaresource.com/2346-staff-assessment-thank-you.html";
to this
document.getelementbyid('iframe_id').src = "http://solutions.healthcaresource.com/2346-staff-assessment-thank-you.html";
Comments
Post a Comment