fries88
January 24, 2008, 12:10pm
21
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.
fries88
January 24, 2008, 12:12pm
22
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)
fries88
January 25, 2008, 2:31am
23
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.
fries88
January 25, 2008, 5:29am
24
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
fries88
January 25, 2008, 7:31am
25
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
fries88
January 25, 2008, 2:16am
26
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?