fb object not global??

Page: 1

Author Post
Member
Registered: Jan 2009
Posts: 24
is fb global or not? I am trying to do fb.end() inside a function with setTimeout().

Whenever my function calls fb.end, I get fb.end() not defined error. But if I just type it in firebug, floatbox closes. So it seems like fb.end() does not work inside a function.

Any suggestions?

Thanks.
Administrator
Registered: Aug 2008
Posts: 3382
Yeah, it's global. It's the only global var/object exposed by floatbox. My bet is you perhaps are working within an iframe in which case you need to worry about what window holds fb and what window is running your timeout.

From an iframe top.setTimeout(function() {top.fb.end();}, 2000); works. (Or you can use "parent" in place of "top" if you prefer.

Page: 1