IE7 - scribd viewer error when loading in Thickbox

39 views
Skip to first unread message

archmapper

unread,
Nov 26, 2009, 8:08:39 AM11/26/09
to Scribd Platform Talk
I'm trying to load a page into ThickBox using an iframe. The page
contains the demo html found here:
http://www.scribd.com/developers/js_api_example/index.html

In FF it works fine, but in IE7 I get "Error 'scribd' is undefined".

I've tried to use jQuery to make sure the DOM is fully loaded before
calling the scribd object, but I get the same error in IE7, again FF
works without a problem.

Is there some trick I'm missing with IE7?

cheers,

Steve

archmapper

unread,
Nov 26, 2009, 8:34:03 AM11/26/09
to Scribd Platform Talk
Hmm, if I wait for a period of time it works in IE7!

This seems to mean that IE7 hasn't loaded the scribd view.js file yet.

Is it possible to download the view.js file and call it directly from
my application, rather than from the scribd servers? Or is there a
better method of making sure IE has it fully loaded?

cheers,

Steve

archmapper

unread,
Nov 26, 2009, 9:12:37 AM11/26/09
to Scribd Platform Talk
OK, it works fine when I download the view.js file and run it from my
application.

However, I noticed huge memory leaks in IE7 when loading the scribd
viewer into ThickBox via an iframe.

Does the scribd API have a function I can call onunload, so I can
destroy all objects and events, a bit like the GoogleMaps API does?

cheers,

Steve

Jared Friedman

unread,
Nov 26, 2009, 1:22:04 PM11/26/09
to scribd-platfo...@googlegroups.com
Hi Steve,

Responding to the last point, unfortunately no we don't.  The memory leaks come from the Flash object itself, though, so you should force browsers to unload the Flash object.  Just the little bit of JS we install around it shouldn't lead to noticeable resource consumption.

Cheers
Jared

--

You received this message because you are subscribed to the Google Groups "Scribd Platform Talk" group.
To post to this group, send email to scribd-platfo...@googlegroups.com.
To unsubscribe from this group, send email to scribd-platform-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scribd-platform-developers?hl=en.



archmapper

unread,
Nov 26, 2009, 1:29:18 PM11/26/09
to Scribd Platform Talk
Jared -

Thanks for the quick reply.

Do you have any example of how to force browsers to unload the Flash
object onunload?

On Nov 26, 6:22 pm, Jared Friedman <ja...@scribd.com> wrote:
> Hi Steve,
>
> Responding to the last point, unfortunately no we don't.  The memory leaks
> come from the Flash object itself, though, so you should force browsers to
> unload the Flash object.  Just the little bit of JS we install around it
> shouldn't lead to noticeable resource consumption.
>
> Cheers
> Jared
>
> > scribd-platform-dev...@googlegroups.com<scribd-platform-developers%2Bunsu...@googlegroups.com>
> > .

Jared Friedman

unread,
Nov 26, 2009, 1:32:11 PM11/26/09
to scribd-platfo...@googlegroups.com
Hi Steve,

Sorry, not an expert with this.  But Scribd's JS works by adding an object/embed tag inside of a containing div (the ID of which you pass to the JS).  I'd start by setting the innerHTML of that div to blank and see which browsers correctly garbage collect the nonexistent Flash object.

Jared


To unsubscribe from this group, send email to scribd-platform-dev...@googlegroups.com.

archmapper

unread,
Nov 27, 2009, 8:47:27 AM11/27/09
to Scribd Platform Talk
Jared -

I tried this but IE still holds onto memory.

Do any of your developers know of a javascript function that will loop
each object/event etc and destroy them, or even force GC to kick in?

cheers,

Steve

On Nov 26, 6:32 pm, Jared Friedman <ja...@scribd.com> wrote:
> Hi Steve,
>
> Sorry, not an expert with this.  But Scribd's JS works by adding an
> object/embed tag inside of a containing div (the ID of which you pass to the
> JS).  I'd start by setting the innerHTML of that div to blank and see which
> browsers correctly garbage collect the nonexistent Flash object.
>
> Jared
>
> > <scribd-platform-developers%2Bunsu...@googlegroups.com<scribd-platform-developers%252Buns...@googlegroups.com>
Reply all
Reply to author
Forward
0 new messages