no no thats my typin mistake HERE.... sorry about that... actually it
is increment="friends"+i;
and it seems to be not working...
On Jun 30, 11:52 am, "Arne Roomann-Kurrik (Google)"
<[EMAIL PROTECTED]> wrote:
> Prithvi,
>
> It looks like your code has a typo. Does changing the line that
> reads
>
> increment="ifriends"+i;
> to
> increment="friends"+i;
>
> make any difference?
>
> ~Arne
>
> On Jun 26, 2:03 am, Prithvi Raj <[EMAIL PROTECTED]> wrote:
>
> > Nope! i tried that. The alert is also not working. Its not at all
> > displaying!!
>
> > Is it ok if I use makerequest() for each and every friends of mine?
>
> > On Jun 26, 4:47 am, "Rajiv Renganathan" <[EMAIL PROTECTED]> wrote:
>
> > > hi..
>
> > > what is the problem?
>
> > > u could start with a alert(document.getElementById(increment)) to check if
> > > ur element is discovered properly.
>
> > > - rajiv
>
> > > My App: Flaunt It!
>
> > > On Thu, Jun 26, 2008 at 5:10 AM, Prithvi Raj <[EMAIL PROTECTED]> wrote:
>
> > > > I need to increment <div id="friends0"> ....... <div
> > > > id="friends25"> .. and so on...
> > > > That is... for every Friend of the user. Iam fetching some data from
> > > > my server. And display them.
> > > > I want to create a unique div ID for each of the html content fetched
> > > > for each user. But there is some problem in iterating the div iDs...
> > > > there problem is in the statement
> > > > document.getElementById(increment).innerHTML = html; where
> > > > 'increment' is a variable containing "friends"+i. where i iterates....
> > > > What should i do to make this code work??
>
> > > > Here is the code i have used.
> > > > ------------------------------------------------------
> > > > var i=0;
> > > > var increment="friends"+i;
>
> > > > viewerFriends.each(function(person) {
>
> > > > makePOSTRequest();
>
> > > > function makePOSTRequest();
> > > > {
> > > > .
> > > > .
> > > > .
> > > > .
> > > > gadgets.io.makeRequest(url, reqpost, params);
> > > > }
>
> > > > function reqpost(obj) {
>
> > > > var str = obj.text;
> > > > var html = str.substr(0,400);
>
> > > > document.getElementById(increment).innerHTML = html; // i tried
> > > > even (""+increment+"") and without assigning it to a variable i tried
> > > > directly also ("friends"+i)
>
> > > > };
>
> > > > i=i+1;
> > > > increment="ifriends"+i;
>
> > > > });
>
> > > > ---------------------------------------
> > > > if this is not a proper way. What all the other ways can i fetch data
> > > > from my server for each person???
>
> > > --
> > > -------------------------------------------------------------------------------------------------
> > > DealSearchMaadi.com > Searching over 12 websites for shopping deals across
> > > India.
> > > -------------------------------------------------------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---