External link in inline frame


#1

Hi folks,

I’ve got an inline frame on a page of a prototype where I’ve successfully embedded an external website. There’s a button that links to another page of the prototype which also works, but I’d like to provide a link back to the inline frame with the external site in the same state as the user left it.

Is this possible? Currently it links back but reloads the website from the start, which loses everything the user did.

Thanks!

Karl


#2

You can try making the Inline frame into a dynamic panel.

Then when you go back you load and set the dynamic panel to the state you want.


#3

Since linking to another page in the prototype reloads the page, no. You can’t. That leaves you with two options:

  1. Don’t reload the page
  2. Pass the correct state back to the external site when it loads again

The first requires you to re-architect your prototype such that everything happens on one page. At a high level, you could use dynamic panel states to simulate “pages.” This way the iframe is never reloaded and you preserve the state of the external site.

The second option requires that your external site can handle retrieve its state from the URL, such that you could track state with Axure variables and then construct the correct URL for the external site to show the state you want. For example, perhaps it supports something like https://www.google.com/?q=query", where Google uses query parameters to pass state to the page and prefills the search box with query. Of course I do not know if the site you’re using implements anything like that.

Another way to do this entirely on your end would be to use some JavaScript to grab the location of the iframe before you go to the next page, save it to a variable, and then on the next page reload the iframe using the URL in that variable. This does not guarantee it will be the same state though if the website changes state but didn’t reflect it in the URL.

The first option is probably the easiest.


#4

Thanks so much for the comprehensive answer @nkrisc, really appreciate it.

So you’ve confirmed that the website will always reload if it’s on a separate page of the prototype and that’s all I need to know really.

Option one certainly sounds like the least amount of faff so that’s what I’ll do, shouldn’t be too tricky to achieve.

Thanks again!