Hi, Im trying to insert a <tr> into a table. the code is as below. HTML --------- <table id="tab"> <tr> <!-- SOME <td>s HERE --> </tr> <%= render :partial => "item", :collection => @order.items %> <tr id="empty_row"> <td> <div style="display:none;" id="plussign"><%= add_item_link "+" %></ div> </td> <!-- MORE <td>s HERE --> </tr> <!-- MORE <tr>s HERE --> </table> _item.html.erb --------------------- <tr class="row"> <!-- <td>s HERE --> </tr> helper method --------------------- def add_item_link(name) link_to_function name do |page| page.insert_html :before, :empty_row, :partial=>''item'', :object => Item.new end end This works in FF but not in Safari. Any idea what the problem might be? Thanks.
Hi In my case none of the rjs working with any of the browsers. even the page.alert function please let me know the prob error msg is try { } catch (e) { alert(''RJS error:\n\n'' + e.toString()); alert(''''); throw e } -nirosh- On Aug 7, 3:16 pm, Ram <yourstruly.vi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > Im trying to insert a <tr> into a table. the code is as below. > > HTML > --------- > <table id="tab"> > <tr> > <!-- SOME <td>s HERE --> > </tr> > > <%= render :partial => "item", :collection => @order.items %> > > <tr id="empty_row"> > <td> > <div style="display:none;" id="plussign"><%= add_item_link "+" %></ > div> > </td> > <!-- MORE <td>s HERE --> > </tr> > <!-- MORE <tr>s HERE --> > </table> > > _item.html.erb > --------------------- > <tr class="row"> > <!-- <td>s HERE --> > </tr> > > helper method > --------------------- > def add_item_link(name) > link_to_function name do |page| > page.insert_html :before, :empty_row, :partial=>''item'', :object > => Item.new > end > end > > This works in FF but not in Safari. Any idea what the problem might > be? > Thanks.
had to insert <tbody> tags for it to work in Safari. On Aug 7, 3:21 pm, nirosh <kunalan.kand...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi > > In my case none of the rjs working with any of the browsers. even the > page.alert function > please let me know the prob > > error msg is > > try { } catch (e) { alert(''RJS error:\n\n'' + e.toString()); alert(''''); > throw e } > > -nirosh- > > On Aug 7, 3:16 pm, Ram <yourstruly.vi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi, > > > Im trying to insert a <tr> into a table. the code is as below. > > > HTML > > --------- > > <table id="tab"> > > <tr> > > <!-- SOME <td>s HERE --> > > </tr> > > > <%= render :partial => "item", :collection => @order.items %> > > > <tr id="empty_row"> > > <td> > > <div style="display:none;" id="plussign"><%= add_item_link "+" %></ > > div> > > </td> > > <!-- MORE <td>s HERE --> > > </tr> > > <!-- MORE <tr>s HERE --> > > </table> > > > _item.html.erb > > --------------------- > > <tr class="row"> > > <!-- <td>s HERE --> > > </tr> > > > helper method > > --------------------- > > def add_item_link(name) > > link_to_function name do |page| > > page.insert_html :before, :empty_row, :partial=>''item'', :object > > => Item.new > > end > > end > > > This works in FF but not in Safari. Any idea what the problem might > > be? > > Thanks.