get code by class, remove whitespace, append to URL, then update iframe URL.

This page will allow you to change the URL/source of an Iframe when you click the button. Right now it’s set to change to your home page URL,

<!-- wp:codemirror-blocks/code-block {"mode":"javascript","mime":"text/javascript"} -->
<div class="wp-block-codemirror-blocks-code-block code-block"><pre>Qualtrics.SurveyEngine.addOnload(function()
var that = this;
this.questionclick = function(event,element){
if (element.type == 'radio') {





/*Place your JavaScript here to run when the page is unloaded*/

<!-- /wp:codemirror-blocks/code-block -->

<!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link">Run the code</a></div>
<!-- /wp:button -->


Leave a Reply

Your email address will not be published. Required fields are marked *