Frederick Cheung wrote: > On Sep 22, 7:31�pm, "Conrad Taylor" <[EMAIL PROTECTED]> wrote: > >> �page.insert_html :bottom, 'messages', 'test' >> end >> page.call 'updateMessageWindow' >> > That's not true. You don't need the block variable (and in your > example it's doubly bad because you would be overwriting the magic > page variables with the integers 0 to 2. > > What's the whole of the rjs file ? > > Fred
Right, as it's an rjs file it is automatically wrapped inside a block. After struggling a day with the code and not being able to detect any syntax error whatsoever I checked the encoding of the line endings. To my surprise they were encoded as carriage returns (CR, Mac style). Changing them to Linux (LF) or Windows (CR+LF) style solved the problem and the parser was happy again. I have no clue why my editor (intype) suddenly inserted CRs instead of line feeds (other files I've written with the same editor have a correct encoding of the line endings). To conclude, the syntax error hadn't anything to do with RJS templates in special. -- 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 [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 -~----------~----~----~----~------~----~------~--~---

