other options are to use

jQuery's document on ready call
or to place the javascript after that part of the dom, which renders
the js fastest

in the instance of flash, we try to load the flash with JS right after
the dom element that we want it placed in.

<div id='flashcomponent"></div>
<script>
//some script to replace/embed the div with the flash component
</script>

On Mon, May 5, 2008 at 10:00 AM, Arne Roomann-Kurrik
<[EMAIL PROTECTED]> wrote:
> Hi Nikhil,
>
>   Your gadget is attempting to access DOM before the page is done loading,
> which is causing a JavaScript error that breaks your gadget.  You should
> wrap your code in a function and register it with a
> gadgets.util.registerOnLoadHandler call.  This will execute your code when
> the page is done loading and you can access the "sociobabble-storyview"
> element.
>
> Hope this helps,
> ~Arne
>
>
>
> On Mon, May 5, 2008 at 5:53 AM, Nikhil <[EMAIL PROTECTED]> wrote:
> >
> > All of my javascript functions are 'undefined' when the app is
> > actually run.
> >
> > You can see the source at
> >  * http://sociobabble.googlecode.com/svn/trunk/utils.js
> >  * http://sociobabble.googlecode.com/svn/trunk/sociobabble.xml
> >
> > But I can't figure out whats wrong, the code is correct as far as i
> > know
> >
> > Thanks
> > Nikhil
> >
> >
>
>
>
> --
> OpenSocial IRC - irc://irc.freenode.net/opensocial
>
>
>  >
>



-- 
-- 
Justin Kruger
http://jDavid.net
[EMAIL PROTECTED]

"If you are successful, it is because somewhere, sometime, someone
gave you a life or an idea that started you in the right direction.
Remember also that you are indebted to life until you help some less
fortunate person, just as you were helped." --Melinda Gates

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenSocial Application Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to