I'm using Fancybox to display webpages through an iFrame. Those webpages are like a little information network : they're calling each others via links, and user can circle through them.
I wanted to implement back et forth buttons : I did it by putting those buttons directly inside the displayed page, and working with the history (history.go(-1)) : that works, as long as the browser behave in the way they do with iFrames.
However, there's a problem : if the user click on the back button and is on the first page of his navigation, it will bring him back out of the website itself (as, out of the fancybox, it's a one-page website).
As for security purpose you cannot have access to the history and test it to avoid that, is there a way to find out if the user will get out of the domain if he does a step more ? Document.referent doesn't seem to work in the contexte of Fancybox and iFrames…