Definitely sounds like an interesting exercise. You mention: > To try and minimise change to the views I created a cfc called AjaxWrapper > that has various methods to create html (the <script> tags with js libraries > etc) for the <head> of pages as well as return js strings that can be used on > href or onClick events in the View pages.
I like the idea of a method that returns all of the common setup script for the <head>, but I have a suggestion about the inline items (e.g., href and onClick). Rather than code any JS at all in your views (or calls to your AjaxWrapper), why not just generate all of it with jQuery after the page loads. You can use jQuery to dynamically assign events to any DOM element, so you could code your view page with no JS at all. Then all of the JS that you need done could be dealt with via <script>. That just seems like a clearer separation of concerns to me. jQuery is the only JS framework that I've used thus far (othen than good ol' qForms, that is), so I don't know if all of the other frameworks allow you to do that type of dynamic assignment. -- Bob Silverberg www.silverwareconsulting.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CFCDev" 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/cfcdev?hl=en -~----------~----~----~----~------~----~------~--~---
