Hi,

I've recently created my own widget and have overriden the
getJavascripts() to return an array of javascript files to support the
widget.

The form is used in the admin generator, and the
include_javascripts_for_form() helper is used to add <script> tags to
add the javascript files to the page. This all works well enough.

However, I'm wondering why it echos the <script> tags in the body -
could the helper not use the use_javascript() helper to add the
<script> tags to the <head> tag? IMO this has a couple of advantages:

1) if the same javascript file is already included (e.g. from a
view.yml), it won't be included again
2) it's 'cleaner' keeping the external js files loaded in the header
tag, rather than at points in the <body>

There's probably a reason why it can't work like this, but I can't
think of it! Also, this applies to stylesheets too.

Thanks,
Andy.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" group.
To post to this group, send email to symfony-devs@googlegroups.com
To unsubscribe from this group, send email to 
symfony-devs+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to