Problems with link_to_remote

Frederick C. wrote:

Why involve the session? If you want to do something 5 times then it’s
as simple as

<% 5.times.do |index| %>

<% end %>

Fred

But won’t that print the stuff inside the <% 5.times do |index| %> 5
times when the link is clicked? I only want the stuff to be printed out
once with the number incremented each time the link is clicked.

Example:
Item 0 when link is clicked,
Item 1 when link is clicked,
Item 2 and so on.

I loop to get the incementing number for Item some_number. I tried many
How do I or should I do this counter?

Ruby executes where?
Ajax executes where?

can you mix them?

So, where could you put that counter?

(Hint: a loop isn’t even involved)

Ah, I couldn’t see any mention of it in the docs on it’s noobkit.com
page,
hence why I said it.

On Jan 24, 2008 7:05 PM, Frederick C. [email protected]
wrote:


Ryan B.

Feel free to add me to MSN and/or GTalk as this email.

Ryan B. wrote:

Ah, I couldn’t see any mention of it in the docs on it’s noobkit.com
page,
hence why I said it.

On Jan 24, 2008 7:05 PM, Frederick C. [email protected]
wrote:


Ryan B.
http://www.frozenplague.net
Feel free to add me to MSN and/or GTalk as this email.

Hi,

Can anyone please tell me how to do counter for the above problems?

Thanks

Declare a js var = 1.
send the var in the request.
use var in controller
on complete increment the variable.
go take a programming class

Keynan P. wrote:

I loop to get the incementing number for Item some_number. I tried many
How do I or should I do this counter?

Ruby executes where?
Ajax executes where?

can you mix them?

So, where could you put that counter?

(Hint: a loop isn’t even involved)

In the view ? I might sound like a noob but how is it done?