1) For custom JavaScript, yeah, this is the best practice.
JavascriptHelper also has a cacheEvents method that you can check out
in the API (there's also some notes about it here if you search the
list). It'll help you generate unobtrusive JavaScript, i.e. write all
your events out in one block, or cache them to an external file.
2) You can use a callback function, but all events generated by
JavascriptHelper are automagically wrapped in an anonymous function, so
myFunction would have to be passed as a function call ('myFunction()'),
not a function reference ('myFunction').
If you take a look at some of the generated code, it'll give you a
better idea as to how it operates.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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/cake-php
-~----------~----~----~----~------~----~------~--~---