Open page in iframe-widget with javascript

Hi,

I’ve been playing around with axure & own javascript to get some logic working.
Doing all that in Axure would be huge hassle.

Anyway, doing show and setPanelState is working fine by using :
$axure("@panelname" ).show()
$axure("@panelname" ).setPanelState()

I want to do the same thing for opening a page in an iframe-widget.
$axure("@iframename").openLink( “page.html”, true);

But i can’t get it to work, anyone got any ideas?

Thanks!

I don’t think AxQuery objects have an openLink method, where did you find that? I don’t think that’s correct.

Anyway, you don’t need AxQuery, good old jQuery will do just fine:

$('iframe').attr('src','http://www.axure.com')

That assumes you only have one iframe. If you have multiple and have named it, use this instead:

$('[data-label=name] iframe').attr('src','http://www.axure.com')
1 Like