JavaScript Dynamic Follow Up Page with Marketo Forms

We are using a script that allows us to to change the follow up URLS of a form dynamically so we can use the same form across multiple assets but have different follow up pages.

The issue is that script only works when it loads the form itself rather than bringing it in via the visual editor. If we adjust the code as per the instructions on the developer site to make it work with the visual editor, it stops working.

We need to bring the form in via the editor because we have another script that only works on forms that are loaded in that manner. This script opens the follow up page in the parent window rather than the iframe.

Can you provide any suggestions?

Here's the code for the script:

Dynamic follow up URL:

<script type="text/javascript">// <![CDATA[
  MktoForms2.whenReady(function(form){
    //Add an onSuccess handler
    form.onSuccess(function(values, followUpUrl){
      //Take the lead to a different page on successful submit, ignoring the form's configured followUpUrl.
      location.href = "http://solutions.healthcaresource.com/2346-staff-assessment-thank-you.html";
      //return false to prevent the submission handler continuing with its own processing
      return false;
    });
  });// ]]>

Answer:1

Use document.getElementById('iframe_id').src (given an iframe with an 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";
Answer:2

This has been answered quite a few times before and all the responses seem to point to specificity of the CSS, but as far as I can tell, that does not seem to be the case here. HTML <button class=...

This has been answered quite a few times before and all the responses seem to point to specificity of the CSS, but as far as I can tell, that does not seem to be the case here. HTML <button class=...

  1. jquery override addclass

I have an XML file with many nodes that look just like this: <map-item> <location-name>U Lot (Pine Sreet)</location-name> <link>https://maps.google....

I have an XML file with many nodes that look just like this: <map-item> <location-name>U Lot (Pine Sreet)</location-name> <link>https://maps.google....

  1. child element elements
  2. get elements child element jquery
  3. get child elements of element javascript
  4. get child elements of element
  5. element child elements javascript
  6. element child elements java
  7. child elements parent element

I'm trying to get this panel menu to work. I've been working on it for hours without any success. I have it partially working. See fiddle here. What I'm trying to do is: When you click target 1, ...

I'm trying to get this panel menu to work. I've been working on it for hours without any success. I have it partially working. See fiddle here. What I'm trying to do is: When you click target 1, ...

  1. jquery simple slider codepen
  2. jquery simple slider example
  3. jquery simple slide
  4. jquery simple slideshow
  5. jquery simple slider
  6. jquery simple slider code
  7. jquery simple slider plugin
  8. jquery simple slider responsive
  9. jquery simple slider tutorial
  10. jquery simple slider next previous
  11. jquery simple slider with text
  12. jquery simple slider jsfiddle
  13. simple jquery slide menu
  14. simple jquery slider free download
  15. simple jquery slider example with source code
  16. simple jquery slider w3schools
  17. simple jquery slider with next previous buttons
  18. simple jquery slider with dot navigation
  19. simple jquery slider autoplay
  20. simple jquery slider with thumbnails

I have a MessageBox to show in my app, and it is specified that the 'YES' button has to be on the right. How could I change the YESNOCANCEL order ? (in a CANCELNOYES one maybe?) Here's my actual code ...

I have a MessageBox to show in my app, and it is specified that the 'YES' button has to be on the right. How could I change the YESNOCANCEL order ? (in a CANCELNOYES one maybe?) Here's my actual code ...

  1. change button order android
  2. change button order note 9
  3. change order button text woocommerce
  4. change order button
  5. xiaomi change button order
  6. jira change button order
  7. sweetalert2 change button order
  8. bootbox change button order
  9. miui change button order
  10. change new button order and default content type
  11. sweetalert change button order
  12. change slicer button order
  13. css change button order
  14. qmessagebox change button order
  15. change new button order
  16. change new button order sharepoint
  17. change new button order sharepoint 2013
  18. change place order button text woocommerce
  19. change place order button woocommerce
  20. bootbox confirm change button order