Rich-text Reply

Problem with iframe

NoHat 02-11-15

Problem with iframe

[ Edited ]



I am currently trying to test a new form on my site, which comes as an iframe (the leads are sent directly to my partner).

Here's the message I am getting once I insert the code in the experiment


"Error evaluating variation javascript:
TypeError: undefined is not a function (in function HTMLScriptElement, line 34, col 434)"


After I close this message, the form shows, but I can not track it and/or create a goal. Then when I leave the experiment and get back to it, I can't see the form anymore.


Here's the code for the iframe, in case that helps: 


<div id='formsadis-iframe' data-uid='5241becc8497004fe079e00fe4157782859be66ba43bba790b'></div> <script src='//'></script>


Thanks for your help!

Level 1

Brian_Abad 02-12-15

Re: Problem with iframe

Thanks for the question!

The visual editor will actually only load the parent page. The iframe element itself can be edited but the content within an iframe cannot be edited when loading the parent page. If you are looking to create an experiment of content within an iframe, I suggest loading the iframe's URL within Editor Settings. Please ensure the Optimizely snippet is installed on the iframe'd page.

More in this can be found in our knowledge base:
Brian Abad
Manager, Technical Support
Customer Success