Please ignore this question - it was a long day yesterday and after a
show while I realised where I had made an error which had caused the
whole lot to collapse!


On Jul 12, 4:58 pm, datamgmt <[email protected]> wrote:
> I have a gadget with two tabs, each should be populated with the data
> from one of two XML files
>
> If I only make one makeFeedRequest (see code below) then it all does
> the right stuff
>
> However if I make two calls  debugging with alert shows that the first
> request is getting subsumed by the second request on callback
> i.e. it calls response twice with the values from the second call
>
> The first problem I have to solve is how to make these calls respond
> in such a way that I get both sets of data
>
> Secondly when it comes back the second call makes a mess of the tabs
> This is obvious as it is doing a 'new gadgets.TabSet(__MODULE_ID__);'
> but what can I do to check for the existence of a tab set and
> therefore get it to do the right thing?
>
> Any and all help gratefully received !
>
> function response(obj) {
> // Parsing code omitted
>   var tabs = new gadgets.TabSet(__MODULE_ID__);
>   if (parseInt(url.indexOf("consists_of")) >= 0 ) {
>    var consists_of = tabs.addTab('Consists Of');
>    document.getElementById(consists_of).innerHTML = component_html;
>   } else {
>    var contributes_to = tabs.addTab('Contributes To');
>    document.getElementById(contributes_to).innerHTML = component_html;
>   }
>
> }
>
> function makeFeedRequest(url) {
>   var params = {};
>   params[gadgets.io.RequestParameters.CONTENT_TYPE] =
> gadgets.io.ContentType.DOM;
>   gadgets.io.makeRequest(url, response, params);
>
> };
>
> makeFeedRequest(http://projects.datamgmt.com/datamgmt/repository/svn/
> rss/dashboard/consists_of/1.xml);
> makeFeedRequest(http://projects.datamgmt.com/datamgmt/repository/svn/
> rss/dashboard/contributes_to/1.xml);
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to