Hi, I have a table laid out something like this: <table> <thead> <tr> <th>col 1</th> <th>col 2</th> </tr> </thead> <tbody id="tablebody"> <tr> <td>moo</td> <td>moo</td> </tr> <tr> <td>moo</td> <td>moo</td> </tr> </tbody> </table> I''m using Ajax.Updater with the insertion: option to create a new insertion, like so: var ajx = new Ajax.updater(''tablebody'', ''tr.html'', { parameters: ''name=bob'', insertion: function(obj, str) { var ins = new Insertion.Bottom(obj, str); } }); tr.html just contains: <tr> <td>mee</td> <td>mee</td> </tr> this appears to work in firefox, IE6, and konqueror, but opera messes it up. I''ve traced this to line 1029 of prototype.js. Firefox skips this part (fails the if statement) and moves on to the next part. IE passes the if statement, and fails the try part, then the catch part works. Opera passes the if statement, and ''successfully'' inserts the content using the try block, but in reality, the catch part is more accurate. If you put a "throw(''error'')" in the first line of the try block, opera inserts the row correctly. Anyone know how to fix this? :\ -Jeremy -- Jeremy Kitchen ++ kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org In the beginning was The Word and The Word was Content-type: text/plain -- The Word of Bob. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hi, instead of using Ajax.updater, change to Ajax.Updater (upper case "U") and it should work. Ciao Martin * * * * * * * * * * * * * * * * www.pluxemburg.com www.burnfield.com/martin On 2 feb 2006, at 02.15, Jeremy Kitchen wrote:> Hi, I have a table laid out something like this: > > <table> > <thead> > <tr> > <th>col 1</th> > <th>col 2</th> > </tr> > </thead> > <tbody id="tablebody"> > <tr> > <td>moo</td> > <td>moo</td> > </tr> > <tr> > <td>moo</td> > <td>moo</td> > </tr> > </tbody> > </table> > > I''m using Ajax.Updater with the insertion: option to create a new > insertion, > like so: > var ajx = new Ajax.updater(''tablebody'', ''tr.html'', { > parameters: ''name=bob'', > insertion: function(obj, str) { > var ins = new Insertion.Bottom(obj, str); > } > }); > > tr.html just contains: > <tr> > <td>mee</td> > <td>mee</td> > </tr> > > this appears to work in firefox, IE6, and konqueror, but opera > messes it up. > > I''ve traced this to line 1029 of prototype.js. Firefox skips this > part (fails > the if statement) and moves on to the next part. IE passes the if > statement, > and fails the try part, then the catch part works. Opera passes > the if > statement, and ''successfully'' inserts the content using the try > block, but in > reality, the catch part is more accurate. If you put a "throw > (''error'')" in > the first line of the try block, opera inserts the row correctly. > > Anyone know how to fix this? :\ > > -Jeremy > > -- > Jeremy Kitchen ++ kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org > > In the beginning was The Word and The Word was Content-type: text/ > plain > -- The Word of Bob. > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I''m sure that was just a typo in his email, he said it works on all browsers but opera. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Martin Ström Sent: Thursday, February 02, 2006 2:19 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] dynamic addition of table rows Hi, instead of using Ajax.updater, change to Ajax.Updater (upper case "U") and it should work. Ciao Martin * * * * * * * * * * * * * * * * www.pluxemburg.com www.burnfield.com/martin On 2 feb 2006, at 02.15, Jeremy Kitchen wrote:> Hi, I have a table laid out something like this: > > <table> > <thead> > <tr> > <th>col 1</th> > <th>col 2</th> > </tr> > </thead> > <tbody id="tablebody"> > <tr> > <td>moo</td> > <td>moo</td> > </tr> > <tr> > <td>moo</td> > <td>moo</td> > </tr> > </tbody> > </table> > > I''m using Ajax.Updater with the insertion: option to create a new > insertion, > like so: > var ajx = new Ajax.updater(''tablebody'', ''tr.html'', { > parameters: ''name=bob'', > insertion: function(obj, str) { > var ins = new Insertion.Bottom(obj, str); > } > }); > > tr.html just contains: > <tr> > <td>mee</td> > <td>mee</td> > </tr> > > this appears to work in firefox, IE6, and konqueror, but opera > messes it up. > > I''ve traced this to line 1029 of prototype.js. Firefox skips this > part (fails > the if statement) and moves on to the next part. IE passes the if > statement, > and fails the try part, then the catch part works. Opera passes > the if > statement, and ''successfully'' inserts the content using the try > block, but in > reality, the catch part is more accurate. If you put a "throw > (''error'')" in > the first line of the try block, opera inserts the row correctly. > > Anyone know how to fix this? :\ > > -Jeremy > > -- > Jeremy Kitchen ++ kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org > > In the beginning was The Word and The Word was Content-type: text/ > plain > -- The Word of Bob. > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.
On Thursday 02 February 2006 06:19, Ryan Gahl wrote:> I''m sure that was just a typo in his email, he said it works on all > browsers but opera.yea, it was. -Jeremy -- Jeremy Kitchen ++ kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org In the beginning was The Word and The Word was Content-type: text/plain -- The Word of Bob. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs