Skip to content
Advertisement

How to change iframe source

the issue is that I’m trying to develop a web site and I’m using Google Web Design. So far so good. I’ve inserted an iFrame and I want to change it’s source when I’m pressing a button. Every search that I’ve googled speaks about “src” but my iFrame has “source” attribute. I’ve tried almost every solution that I found but I gave up. It may be a stupid question but how am I supposed to do it? I’ve used “document.getElementById(“myId”)” or “window.frames[‘id’]”… Not a chance. Anyone have an idea? Thanks a lot.

<iframe is="gwd-iframe" id="textToShow" source="" class="gwd-iframe-15nv gwd-gen-mv4zgwdanimation" style="background-image: none;" scrolling="auto">
</iframe>

gwd.goOnTheWeb = function(event) {
    //should be in here
};

Advertisement

Answer

Please take a look into Google Web Designer Help > The iFrame component.

Advertisement