Change iframe contents?

Hello! I'm hoping someone will be able to help me with an iframe question.


I've got an iframe on a page that I use to display a different page from within the same title.


From the main page, how do I change the contents of the iframe to a specific page in the title?


To be more specific, the user is able to navigate to other pages in the chapter within the iframe. I need to be able to get the iframe back to the first page in the chapter.

Discussion (3)

Thanks for the quick response, ssneg!


How do I execute the javascript as an action within an action group?

Execute Javascript: document.getElementById('myiframeidhere').src = 'http://server.com/mytitle/index.html'

On Lectora 11, there's an action type "Run Javascript".

On Lectora X, you can:

a) use action "go to web address" and put "javascript:myjavascriptcode" in the url field

or

b) use action "modify variable" on a dummy variable "set dummyvar to" and put the same string "javascript:yourjscodehere" in the content field

Discussions have been disabled for this post