5 messages in com.googlegroups.google-mashup-editorRe: Extended operations on tabs| From | Sent On | Attachments |
|---|---|---|
| corporaterat | 22 Jun 2007 09:21 | |
| corporaterat | 22 Jun 2007 17:30 | |
| corporaterat | 25 Jun 2007 12:05 | |
| Jason | 25 Jun 2007 13:46 | |
| corporaterat | 25 Jun 2007 14:08 |
| Subject: | Re: Extended operations on tabs![]() |
|---|---|
| From: | Jason (gmej...@google.com) |
| Date: | 06/25/2007 01:46:03 PM |
| List: | com.googlegroups.google-mashup-editor |
Hi arjun. I apologize for the delayed response.
Based on your stated intent, is showSection() not adequate? The following snippet sets up a tab view and uses showSection() to select the second tab at startup:
<gm:page title="My App" authenticate="false" onload="my_init()">
<script type="text/javascript"> <![CDATA[ function my_init() { var container = google.mashups.App.getContainer('mapitntrackit_cont'); container.showSection('findYourFriendsSection'); } ]]> </script>
<gm:tabs target="mapitntrackit_cont" />
<gm:container id="mapitntrackit_cont"> <gm:section id="loginSection" title="Login"> <h1>Login</h1> </gm:section> <gm:section id="findYourFriendsSection" title="Find your friends"> <h1>Find your friends</h1> </gm:section> </gm:container>
</gm:page>
- Jason
On Jun 25, 12:06 pm, corporaterat <arju...@gmail.com> wrote:
bump - for JSON to see (like you haven't heard that one before, Jason)
On Jun 22, 8:30 pm, corporaterat <arju...@gmail.com> wrote:
I fired up 'firebug' on x=google.mashups.getObjectById('mapitntrackit_cont')
It seems the only exported function in the returned object is showSection(). So does it mean it is a bummer for me to get a tabs object handle ?
regds arjun
On Jun 22, 12:21 pm, corporaterat <arju...@gmail.com> wrote:
Hi, I am trying to use JS to perform some extended operations on gm:tabs
I searched around for your APIs and Google gadget apis describe several tab APIs which are useful to me (http://www.google.com/apis/ gadgets/reference.html#Ref_Tabs). My guess is, following the GME JS apis, as long as I get the container object holding the tabs, I should be able to use these APIs (except constructor apis etc)
So, here is what I am trying to do: I have two tabs "Login" and "Find your friends" in _that_ order (Login must be first)
But I want to set focus on the second tab. To do this, I used an onload="my_init" on gm:page
where my_init is: (mapitntrackit_cont is the container containing the two tabs)
function my_init() {var mytabs=google.mashups.getObjectById('mapitntrackit_cont'); mytabs.setSelectedTab(1);
}
Do I need to add a "get<Whatever>" after getObjectById (like getMap() for maps) to get the native object ? If so, what is it, and in general, where can I find a reference for these apis ? I tried .getContainer() - did not work
thanks- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -




