Henrik Ormåsen
2005-Sep-29 05:45 UTC
[Rails-spinoffs] Ajax in the Aguile Web Development... book
I have bought the book, and are working with chapter 18 (about Ajax). I don''t get the List application example to function as expected. When i fill inn a name, and presses "Add Item". The button gets gray, the text "Adding..." is coming up, and the item is being written in the top of the page, but then it freezes here. I uses the newest rails, installed with Gem, and WEBrick 1.3.1 server. When i push the action I get the following output from WEBrick: 127.0.0.1 - - [25/Sep/2005:20:28:33 CEST] "POST /list/add_item HTTP/1.1" 200 247 - -> /list/add_item Anybody knows if this is a bug in the code in the book, or have any suggestions on solutions? The code can be downloaded from: http://pragmaticprogrammer.com/titles/rails/code.html I''ve tried both Firefox, Opera and Galeon for linux (Ubuntu), but get the same result with all of them. Regards Henrik
Jarkko Laine
2005-Sep-29 09:14 UTC
[Rails-spinoffs] Ajax in the Aguile Web Development... book
On 29.9.2005, at 12.13, Henrik Orm?sen wrote:> I have bought the book, and are working with chapter 18 (about Ajax). > > I don''t get the List application example to function as expected. When > i fill inn a name, and presses "Add Item". The button gets gray, the > text "Adding..." is coming up, and the item is being written in the > top of the page, but then it freezes here.It seems that the Effect.highlight call is bombing in that script: Error: this.element.style has no properties Source File: http://0.0.0.0:3000/javascripts/effects.js Line: 236 The line is: var current = this.element.style.backgroundColor; If you take the highlight call away, everything seems to work normal (except there''s no highlighting, of course). //jarkko> > I uses the newest rails, installed with Gem, and WEBrick 1.3.1 > server. > > When i push the action I get the following output from WEBrick: > > 127.0.0.1 - - [25/Sep/2005:20:28:33 CEST] "POST /list/add_item > HTTP/1.1" 200 247 > - -> /list/add_item > > Anybody knows if this is a bug in the code in the book, or have any > suggestions on solutions? > > The code can be downloaded from: > http://pragmaticprogrammer.com/titles/rails/code.html > > I''ve tried both Firefox, Opera and Galeon for linux (Ubuntu), but get > the same result with all of them. > > Regards > Henrik > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > >-- Jarkko Laine http://jlaine.net http://odesign.fi -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2363 bytes Desc: not available Url : http://wrath.rubyonrails.org/pipermail/rails-spinoffs/attachments/20050929/ce0f1cfa/smime.bin