0

We've embedded a 3rd party web app in our site using an IFRAME. Examples: Our Site - Acme.com 3rd Party - Clipmint.com

When the IFRAME page is loaded it should report it's height to our site using the Hash property of the Location object. (Read about this technique and thought it was meant to be cross domain safe)

To do this Clipmint.com has a piece of javascript at the end of each page that is as follows:

top.location.hash = $(document).height();

Firefox is the only browser allowing this. IE, Safari and Chrome are coming up with various "Unsafe" or "Permission Denied" error messages.

I've also tried adding an HTTP header to Acme.com which is as follows: Access-Control-Allow-Origin: Clipmint.com

Any help would really be appreciated.

Regards, Jacques

Jacques
  • 6,936
  • 8
  • 43
  • 102

1 Answers1

-2

Take a look at JSONP. It is supported by JQuery 1.2+ I think.

Karlth
  • 3,267
  • 2
  • 27
  • 28
  • JSONP is about sending requests to the server hosting the external domain isn't it? So if I wanted to use this hash technique to dynamically set the size of my iframe that wouldn't work, because the server would have no idea what the height is of the page when it's rendered? – Jacques Aug 19 '11 at 12:11
  • 1
    Ok. Take a look here: http://stackoverflow.com/questions/4324108/unsafe-javascript-attempt-to-access-frame-with-url It recommends changing the location instead of the hash. – Karlth Aug 19 '11 at 13:22