Hi, I have been trying and searching for so long....... I have a label, a text field and a link_to_remote link. In the rhtml, it looks like this: <tr> <div class="abc"> <td style="width: 374px;"><label>Item 0</label></td> <td style="width: 219px;"><%= n.text_field :display_bin_txt %> <%link_to_remote( "add", :update => "abc", :url =>{ :action => :add_item }, :position => "bottom") %></td> </div> </tr> When I click the link, a new label with the number incremented, Item 1 and a new text field will appear below the previous label, Item 0 and text field. Can anyone tell me how can I acheive that? Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You cannot put a div inside a table row. It is not working because you''ve used the class attribute on the div. Change class to id and get rid of the div, and set the id attribute on the tr tag. On Jan 24, 2008 1:26 PM, user splash <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi, > > I have been trying and searching for so long....... I have a label, a > text field and a link_to_remote link. > > In the rhtml, it looks like this: > > <tr> > <div class="abc"> > <td style="width: 374px;"><label>Item 0</label></td> > <td style="width: 219px;"><%= n.text_field :display_bin_txt %> <%> link_to_remote( "add", :update => "abc", :url =>{ :action => :add_item > }, :position => "bottom") %></td> > </div> > </tr> > > When I click the link, a new label with the number incremented, Item 1 > and a new text field will appear below the previous label, Item 0 and > text field. Can anyone tell me how can I acheive that? > > > Thanks > -- > Posted via http://www.ruby-forum.com/. > > > >-- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ryan Bigg wrote:> You cannot put a div inside a table row. It is not working because > you''ve > used the class attribute on the div. > > Change class to id and get rid of the div, and set the id attribute on > the > tr tag. > > > -- > Ryan Bigg > http://www.frozenplague.net > Feel free to add me to MSN and/or GTalk as this email.Hi, oh...After changing the class to id it I manage to display some text. As I use this codes in the controller to test out the link. def add_item render_text "<p>Item <b>" + DateTime.now.to_s + "</b></p>" end But there are still some problems and questions I want to ask. Even though in the link_to_remote, I set the text to be displayed after the original label and text field by using :position => "bottom", the text is being displayed on top of the original one. Can someone tell me why or what happened here? The other question is when I click the link, a new label with the number incremented, Item 1 and a new text field will appear below the previous label, Item 0 and text field. How do I achieve that? Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
user splash wrote:> Ryan Bigg wrote: >> You cannot put a div inside a table row. It is not working because >> you''ve >> used the class attribute on the div. >> >> Change class to id and get rid of the div, and set the id attribute on >> the >> tr tag. >> >> >> -- >> Ryan Bigg >> http://www.frozenplague.net >> Feel free to add me to MSN and/or GTalk as this email. > >Hi, I missed out a question. As Ryan Bigg said, I can''t put a div inside a table row. How can I display the things i want to display below that row, the row with the original label and text field? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
link_to_remote does not support :position. Could you explain in more detail what you''re trying to do? Your descriptions are extremely vague and I cannot make sense of them. Can you show us the code of that page please? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ryan Bigg wrote:> link_to_remote does not support :position. > > Could you explain in more detail what you''re trying to do? Your > descriptions > are extremely vague and I cannot make sense of them. > > Can you show us the code of that page please?Hi, What I am trying to do is to create an link that adds a new label and text field when i click it. Example: <div id="content"> <% form_for :item, :url => { :action => :save_item}, :html => { :id => "item" } do |n| %> <table style="width: 685px; height: 171px;"> <tbody> <tr> <td style="width: 374px;"><label>Item 0</label></td> <td style="width: 219px;"><%= n.text_field :item %> <%= link_to_remote( "add", :update => "content", :url =>{ :action => :add_item }, :position => "bottom") %></td> </tr> <tr> <td style="width: 209px;"> <div id="button"> <p><%= link_to_function ''Previous'', "$(''item'').submit()" -%></p> </div> </td> </tr> </tbody> </table> <% end %> </div> After I click the link, "add", I will get the following result: Item 0 text field Item 1 text field add(this is a link) . . . When the link is being clicked, another label and text field will be added to the table, the number beside "Item" will increment and the link, "add" will be next to the new added row. I am not sure how can I achieve that. I hope the above explaination is clear enough. Can someone please help me ? Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> What I am trying to do is to create an link that adds a new label and > text field when i click it. > > > Example: > <div id="content"> > <% form_for :item, :url => { :action => :save_item}, :html => { :id => > "item" } do |n| %> > <table style="width: 685px; height: 171px;"> > <tbody> > <tr> > <td style="width: 374px;"><label>Item 0</label></td> > <td style="width: 219px;"><%= n.text_field :item %> <%= > link_to_remote( "add", :update => "content", :url =>{ :action => > :add_item }, :position => "bottom") %></td> > > </tr> > <tr> > <td style="width: 209px;"> > <div id="button"> > <p><%= link_to_function ''Previous'', "$(''item'').submit()" -%></p> > </div> > </td> > </tr> > </tbody> > </table> > <% end %> > </div> > > > > After I click the link, "add", I will get the following result: > > Item 0 text field > Item 1 text field add(this is a link) > . > . > . > > When the link is being clicked, another label and text field will be > added to the table, the number beside "Item" will increment and theSorry I misssed out my controller. In my controller: def add_item render(:inline => %{<tr> <td style="width: 374px;"><label>TEXT FOR BIN CODE 1</label></td> <td style="width: 219px;"><%= n.text_field :item %> </tr>}) end When I click the link, I got this error, undefined local variable or method `n'' for #<#<Class:0x482c428>:0x482c400>. When I take away the n, I got this error, wrong number of arguments (1 for 2). Where did I go wrong and adding on to the previous questions, how can I display the things that will show after I click the link in the correct place, which is under the td tag of the orginal? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> > Sorry I misssed out my controller. > > In my controller: > > def add_item > render(:inline => %{<tr> > <td style="width: 374px;"><label>TEXT FOR BIN CODE 1</label></td> > <td style="width: 219px;"><%= n.text_field :item %> > </tr>}) > end > > > > When I click the link, I got this error, undefined local variable or > method `n'' for #<#<Class:0x482c428>:0x482c400>. When I take away the n, > I got this error, wrong number of arguments (1 for 2). Where did I go > wrong and adding on to the previous questions, how can I display the > things that will show after I click the link in the correct place, which > is under the td tag of the orginal?Hi, Can anyone please help me with the above two posting''s questions? Thank you -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You posted 1 hour ago. Do not expect a reply so quickly. On Jan 24, 2008 5:29 PM, user splash <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > > > Sorry I misssed out my controller. > > > > In my controller: > > > > def add_item > > render(:inline => %{<tr> > > <td style="width: 374px;"><label>TEXT FOR BIN CODE 1</label></td> > > <td style="width: 219px;"><%= n.text_field :item %> > > </tr>}) > > end > > > > > > > > When I click the link, I got this error, undefined local variable or > > method `n'' for #<#<Class:0x482c428>:0x482c400>. When I take away the n, > > I got this error, wrong number of arguments (1 for 2). Where did I go > > wrong and adding on to the previous questions, how can I display the > > things that will show after I click the link in the correct place, which > > is under the td tag of the orginal? > > Hi, > Can anyone please help me with the above two posting''s questions? > > Thank you > -- > Posted via http://www.ruby-forum.com/. > > > >-- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Why is it no one asking questions on here ever seems to bother reading a programming book. The var ''n'' does not exist. HTTP is stateless. It has no f*cking idea you rendered the form with "form_for do |n|" all it knows is what comes in the params object and no you can''t pass ''n'' in the request. this: ===========================================================def add_item render(:inline => %{<tr> <td style="width: 374px;"><label>TEXT FOR BIN CODE 1</label></td> <td style="width: 219px;"><%= n.text_field :item %> </tr>}) end ===========================================================should be in a partial. MVC is a fundamental part of RAILS. That means no html in your controllers. Period. As to your layout. lose the table it will only make this harder. Tables are for tabular data ONLY. You end up with: ==================================================def add_item render(:partial => ''item_inputs'') end ================================================== #item_inputs <label>Item <%= some_counter %></label> <%= text_field :item, :item %> ================================================== # the form <div id="content"> <% form_for :item, :url => { :action => :save_item}, :html => { :id => "item" } do |n| %> <label>Item 0</label></td> <%= n.text_field :item %> <%= link_to_remote( "add", :update => "button", :url =>{ :action => :add_item }, :position => "above") %></td> <div id="button"> <p><%= link_to_function ''Previous'', "$(''item'').submit()" -%></p> </div> <% end %> </div> =================================================== use anything but a table to wrap that markup and you should be fine. Though it would be better to strip down that link_to_remote and push the extra stuff into the partial to work a rjs -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 24 Jan 2008, at 04:50, Ryan Bigg wrote:> link_to_remote does not support :position.Actually it does (but it only has meaning if you''re updating a particular element only (rather than using rjs) Fred> > > Could you explain in more detail what you''re trying to do? Your > descriptions are extremely vague and I cannot make sense of them. > > Can you show us the code of that page please? > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> # the form > > > <div id="content"> > <% form_for :item, :url => { :action => :save_item}, :html => { :id => > "item" } do |n| %> > <label>Item 0</label></td> > <%= n.text_field :item %> > <%= link_to_remote( "add", :update => "button", :url =>{ :action => > :add_item }, :position => "above") %></td> > <div id="button"> > <p><%= link_to_function ''Previous'', "$(''item'').submit()" -%></p> > </div> > <% end %> > </div> > > ===================================================> > use anything but a table to wrap that markup and you should be fine. > Though it would be better to strip down that link_to_remote and push the > extra stuff into the partial to work a rjsHi, Thanks. It works. But there is a problem. I have no idea how to loop this. Can anyone give me some clue? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
loop this? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Keynan Pratt wrote:> loop this?Yup. I have tried using session. Like this: <% session[:count] ||= 1 %> <tr> <td style="width: 374px;"><label>Item <%= session[:count] %></label></td> <td style="width: 219px;"><%= text_field :item, :item %></td> </tr> <% session[:count] += 1 %> It is the right way? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 24 Jan 2008, at 09:59, user splash wrote:> > Keynan Pratt wrote: >> loop this? > > Yup. I have tried using session. Like this: > > <% session[:count] ||= 1 %> > <tr> > <td style="width: 374px;"><label>Item <%= session[:count] > %></label></td> > <td style="width: 219px;"><%= text_field :item, :item %></td> > </tr> > <% session[:count] += 1 %> > > > It is the right way?Almost certainly not. What are you looping over? Fred> > > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 24 Jan 2008, at 09:59, user splash wrote: > >> <td style="width: 219px;"><%= text_field :item, :item %></td> >> </tr> >> <% session[:count] += 1 %> >> >> >> It is the right way? > > Almost certainly not. What are you looping over? > > FredThe text field. Am I heading to the right direction? Or should I loop over the add link? And how do I do that? Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I believe what Fred is asking is "WTF?" Why do you need to loop at all? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Keynan Pratt wrote:> I believe what Fred is asking is "WTF?" > > Why do you need to loop at all?Hi, I loop to get the incementing number for Item some_number. I tried many way to get this counter thing right. Please direct me to the right path if I am wrong. How do I or should I do this counter? Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 24 Jan 2008, at 10:52, user splash wrote:> > Keynan Pratt wrote: >> I believe what Fred is asking is "WTF?" >> >> Why do you need to loop at all? > > Hi, > > I loop to get the incementing number for Item some_number. I tried > many > way to get this counter thing right. Please direct me to the right > path > if I am wrong. > How do I or should I do this counter?Why involve the session? If you want to do something 5 times then it''s as simple as <% 5.times.do |index| %> ... <% end %> Fred> > > Thanks > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Fred note the line:>> way to get this counter thing right. Please direct me to the rightWe are clearly dealing with someone with out the faintest concept. for simple things like this we must not give answers only ask the right questions -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> Why involve the session? If you want to do something 5 times then it''s > as simple as > > <% 5.times.do |index| %> > ... > <% end %> > > FredBut 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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> 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) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Keynan Pratt 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? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On 24 Jan 2008, at 04:50, Ryan Bigg wrote: > > > link_to_remote does not support :position. > > Actually it does (but it only has meaning if you''re updating a > particular element only (rather than using rjs) > > Fred > >-- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ryan Bigg 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 Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > >> >> > > -- > Ryan Bigg > 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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---