Thanks for the reply.
I tried using gadgets.util.registerOnLoadHandler, but it's telling me
that gadgets.util has no properties (gadgets is defined, but the only
child object shown in firebug is gadgets.views).
I'm currently using _IG_RegisterOnloadHandler(). If I put my alert
inside that handler, it's called when the view switches from canvas to
home, but not home to canvas. I verified that using a breakpoint in
firebug.
I've seen some recent threads about problems with the gadgets.* api.
Is that why I'm not seeing gadgets.util, or do I need to include a
<Require feature> or some javascript?
Do you think gadgets.util.registerOnLoadHandler will behave
differently from _IG_RegisterOnloadHandler?
Thanks!
On Oct 29, 3:30 pm, "Dan (Google Employee)" <[EMAIL PROTECTED]>
wrote:
> Hi Dean,
>
> How are you triggering the alert? Just including it at the top of the
> JS might not be sufficient. I would suggest executing the code inside
> of gadgets.util.registerOnLoadHander.
>
> Best,
> Dan
>
> On Oct 29, 7:44 am, Dean <[EMAIL PROTECTED]> wrote:
>
> > Is there any way to detect when a user switches between canvas and
> > home views? I'd like to change the title of my gadget based on the
> > view.
>
> > I tried inserting the following code at the top of my javascript:
>
> > alert("View = " + gadgets.views.getCurrentView().getName());
>
> > The alert shows up when going from canvas to home, but not from home
> > to canvas.
>
> > Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"iGoogle Developer Forum" 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/Google-Gadgets-API?hl=en
-~----------~----~----~----~------~----~------~--~---