Problems with cross-frame references in Chrome

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
GaryUK
Propeller Head
Posts: 58
Joined: Thu Aug 29, 2013 12:19 am
Location: Surrey UK

Problems with cross-frame references in Chrome

Post by GaryUK »

Hi,

I've written several bits of code in JavaScript/Jquery where I look at details in frames other than the topic frame. For example, to see if the navigation pane is open when resizing the browser, I set a variable:
displayed=top.$("#navigation").css("display");

It's the "top." part that makes it look in all of the frames. It works fine in IE, even without MOTW, but Chrome an Opera hate it. My research indicates that they regard it as a security issue:

Uncaught SecurityError: Blocked a frame with origin "null" from accessing a frame with origin "null". Protocols, domains and ports must match"

I thought that "null" and "null" were the same, but anyway...

Does anyone know of a foolproof way to access non-topic information? Surely Flare must have to do this itself all the time.
Mike Kelley
Propeller Head
Posts: 68
Joined: Fri Aug 22, 2014 12:24 pm

Re: Problems with cross-frame references in Chrome

Post by Mike Kelley »

Did you try putting that project output on a web server? I found that testing frame-to-frame JavaScript on a local machine or file server would yield those results. It's a security issue that IE hasn't bothered to patch. For me, the solution to that security issue was putting the content on an actual web server (Apache and IIS worked).
GaryUK
Propeller Head
Posts: 58
Joined: Thu Aug 29, 2013 12:19 am
Location: Surrey UK

Re: Problems with cross-frame references in Chrome

Post by GaryUK »

Hi Mike,

Thanks for replying. I didn't think about that but I'm sure it would work. The problem is that we don't have any intention of ever hosting the help on a web server. We want the look of HTML5 but not on the web. The developers are dead against installing any kind of web infrastructure at the customer.

To get past this, I had to move the code around and pass messages between frames using postMessage. It works fine in IE, Chrome, Firefox and Opera.
Post Reply