Ok so Prototype effectively says that Javascript code anywhere in an HTML file is not cool, e.g. you should use observe to give HTML elements listeners which fire functions.
But then where should the code start? Let me elaborate. Given the first assumption, I now have no javascript in my HTML save the files included in the <head>. But, for me to start JavaScript execution in one of these files is useless - if I try to use observe() then obviously the rest of the page hasn't loaded yet, and the script terminates. So how do people layout their code? Surely you have to have <body onload="..."> or something to let the Javascript know when it can fire away? Thanks in advance for all thoughts and advice. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" 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-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
