I'm using FB to load an html page in an iframe. What would be the best way to have that html page determine whether it's in a floatboxed iframe, and if not, then stop working?
Basically, I want to make sure that my page is getting loaded in the context of my site and people are not just going directly to the url. The contents of the page is being loaded by javascript, so I'm hoping there is some easy way to say "if not in a floatbox, don't load the content".
How to detect presence of FB?
Page: 1
Author | Post |
---|---|
flyingpylon
|
#1 Fri Apr 24, 2009 2:18 am
|
Guest | |
#2 Fri Apr 24, 2009 2:32 am
|
|
Administrator
Registered: Aug 2008
Posts: 3382
|
For your purposes, it's probably good enough just to determine if any floatbox is loaded on your page. The following would accomplish this:
if (top.fb && top.fb.fbContent) ... |
flyingpylon
|
#3 Fri Apr 24, 2009 5:02 pm
|
Guest |
Works great... thanks!
|
Page: 1