1

I have a simple "360 Tours" page on a client's Opencart website, using an iFrame on an info page. The page opens with an outside view, the visitor can then select other areas to view by clicking links below. The viewer code pannellum.htm and all the panoramic images are hosted on the client's server with the viewer displayed in an iFrame based on Pannellum's examples.

This was trivial to get working and has operated correctly for months but recently stopped working, displaying nothing where the panoramas once were. I tried Chrome, Firefox & Safari under OSX, Windows and an iPad without Joy. However, this morning I noted that my Chromebook still worked perfectly. So, I updated the Chromebook and it too stopped working. Nothing at my end has changed, though I did update to the latest pannellum.htm today to no avail.

A JS function load360() forms a url and loads this into the .src property of the iFrame which is located by id. Originally, the working code looked like this:

let url=...
let frame=document.getElementById("mf-360");
frame.src=url;
frame.contentWindow.location.reload(true);

Searching reveals that the reload is not required and simply assigning a new url to the .src property should be enough to force a refresh of the iFrame. Removing the reload had no effect, and in fact having it there stops the viewer from ever displaying. However, assigning a blank string to .src then the required url like this..

let url=...
let frame=document.getElementById("mf-360");
frame.src='';
frame.src=url;

..seems to work, but only every _second) time load360 is called.

Does anyone have any idea what's going on?? I'm more of an electronics-design/embedded guy and any help here would be most appreciated..

The site is https://www.davidcoils.com - click '360 Tours' at the top.

Gordo
  • 11
  • 2

0 Answers0