On Tue, Aug 2, 2011 at 6:09 AM, DJ Patterson
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:
> I currently have a timesheet page which displays a calendar, a search
> function that allows a user to search for a project. Once the user has
> selected a specified project they press the plus button that creates a
> new row in a new table. I''ve done this using Javascript. I am so
close
> to finishing this functionality.Forgive me if this sounds stupid, as I
> am new to rails. I was wondering is it possible to parse in a rails
> object into Javascript, so that when the plus button is selected it then
> creates a new row with the data.
>
> Example of some of my code:
>
> <% @projects.each do |project| %>
> <tr>
> <td><%= project.project_number %></td>
> <td><%= project.project_name %></td>
>
> <td><%= link_to_function
image_tag("icons/add.png"),
> "CreateNewRow(#{project.some_data})" %></td>
>
> </tr>
>
> This simply creates a new a table, and list all the projects in my
> projects table. A plus icon is linked to CreateNewRow() Javascript
> function. I currently have the createNewRow() function working. However
> I can''t seem to get it to take the data and put it into new
created row.
> Supplied an image to make it a little bit more clearer.
>
> Attachments:
> http://www.ruby-forum.com/attachment/6479/timesheet.png
>
>
> --
> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.