Friday, 9 August 2013

Append text to iframe parent address bar

Append text to iframe parent address bar

Is there a way to append some text to the iframe parent's address bar? I
know you can accomplish this by using HTML5 history.replaceState, even
there's an approach to this by using history.js, but it seems it doesn't
work for the parent (_top) of an iframe. Also the parent's domain differ
from the iframe's domain (I know this may be a cause for my problem).
I want to do this because I made embedded script that I can insert on any
website, it mainly creates an iframe with some content on it, but I want
to be able to append some text to the parent's address bar in order to be
able to share that link on facebook or twitter (I want to share the
parent's url, not the iframe url).
Does somebosy knows if this can be done? Or may be another solution to my
problem?
Thanks!

No comments:

Post a Comment