Book a Demo

Author Topic: Displaying HTML reports in iFrames  (Read 10577 times)

John Lynn

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Displaying HTML reports in iFrames
« on: December 10, 2015, 10:01:17 am »
Hey folks,

I'm trying to embed an iframe with a SPARX HTML report in it (so that I can embed it in an internal company page).

I am using a URL which looks like "http://corporate.site.com/folder/Index.html?guid={...}". When I use the URL in the browser it works great, but when I embed it in the iFrame it starts to pull the page (it displays the header), but then never loads the rest of the content.

Have you guys run into this issue before? Do you know what might be the issue? I guess I can just embed a URL instead of an iFrame, but I'd love to let users interact with the diagrams within the parent page.

AndyJ

  • EA User
  • **
  • Posts: 337
  • Karma: +5/-3
  • It's only a model
    • View Profile
Re: Displaying HTML reports in iFrames
« Reply #1 on: December 10, 2015, 11:23:29 am »
Purely out of interest...

Have you tried looking with different browsers?
Sun Tzu: "If you sit by the river long enough, eventually the body of MS Visio floats past."

John Lynn

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Displaying HTML reports in iFrames
« Reply #2 on: December 10, 2015, 11:27:39 am »
Yes, IE11 and FF38.8.

We don't typically use Chrome.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Displaying HTML reports in iFrames
« Reply #3 on: December 10, 2015, 07:16:42 pm »
Hi John,

Could be a JavaScript issue possibly?
The generated HTML contains a truckload of JavaScript.

/Uffe
My theories are always correct, just apply them to the right reality.

OpenIT Solutions

  • EA User
  • **
  • Posts: 555
  • Karma: +9/-1
    • View Profile
Re: Displaying HTML reports in iFrames
« Reply #4 on: December 11, 2015, 03:01:42 am »
Hi,

Is your sparx generated html and your company site on the same domain/sub-domain ? As mentioned the sparx html uses Javascript to create the project browser menu / navigation pain on the left and various other bits and Javascript want work across domains...

Regards,

Jon.

John Lynn

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Displaying HTML reports in iFrames
« Reply #5 on: December 11, 2015, 03:03:38 am »
Ah, that might be it. They are on separate servers. I will look into that and see if that solves the issue.

John Lynn

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Displaying HTML reports in iFrames
« Reply #6 on: December 11, 2015, 03:55:06 am »
I moved the page with the iframe to the same server/folder as the report, and the issue persists, so it doesn't appear to be cross-domain.

This is the code I have in "test.html", which is in the same directory as "index.html":

Code: [Select]
<html>
      <body>
            <iframe src="index.html?guid={8FF14D7F-F8BB-4b60-9EBB-948D7FCC90E2}" width=800 height=500 />
      </body>
</html>

OpenIT Solutions

  • EA User
  • **
  • Posts: 555
  • Karma: +9/-1
    • View Profile
Re: Displaying HTML reports in iFrames
« Reply #7 on: December 11, 2015, 04:27:05 am »
Try ./index.html ? I'm sure its something along the iframe domain issue - as i hit somehting similar sometime ago ... i'll dig around ...

derek.carvell

  • Guest
Re: Displaying HTML reports in iFrames
« Reply #8 on: December 16, 2015, 06:53:41 pm »
We hit this issue recently. The problem is regarding the introduction of another iFrame and the references to iFrames in the EA generated javascript, for example, top.document.body.clientWidth. The new iFrame becomes the new top, effectively stopping the code running as expected.

We ended up amending the javascript to accomodate the new iFrame and this got around the issue. Hope this helps you.

JeffS

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Displaying HTML reports in iFrames
« Reply #9 on: May 08, 2017, 10:23:07 pm »
We ended up amending the javascript to accomodate the new iFrame and this got around the issue. Hope this helps you.

Derek, are your modifications something you can share? I hoped this would be fixed in v13 as we have to embed the export in an iFrame but it still doesn't work. I would love to see how to fixed it before I chase this rabbit down the hole myself.