2009/6/12 Frederick Cheung <[email protected]>: > > > > On Jun 12, 4:31 pm, Colin Law <[email protected]> wrote: >> 2009/6/12 Tyler Knappe <[email protected]>: >> > Does anyone know how to dynamically generate div tags? >> >> > I tried this: >> >> > <th><div id = "test_div_" + ij"" style = "display :inline;"> Available >> > </div></th> >> >> > Which didn't work, rather it gives me this in the source: >> >> > <th><div id = "test_div_" + ij"" style = "display :inline;"> >> > Available </div></th> >> >> Assuming you are in erb then <div id="test_div_#{i}#{j}" > or similar >> should work > > I think you meant <%= i%> rather than #{i} >
@Fred - I suppose if pushed I might reluctantly agree that your suggestion has some validity. I think the moral is Engage brain before typing. Colin --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

