PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Externalize Javascript please

  1. Naatan
    Member

    For AJAX forms you currently embed the javascript inside the body tag of the page. However this creates a lot of problems when embedding multiple Ajax form, as well as in trying to make navigation on a blog AJAX friendly (ie the body of pages is loaded through AJAX).

    I'd really appreciate it if you could externalize all Javascript into a dedicated JS file that takes form specific values as attributes. You could easily do this either by monitoring the jQuery append methods or if you really want to embed some JS then narrow it down to just the essentials (eg. a call like load_gform(id)).

    Aside from this being more intuitive and less likely to break it's also a lot cleaner. I'm a bit discouraged by paying for a Wordpress plugin just to find it not only embeds Javascript inside the body tag of the document but it also prints out this Javascript straight from PHP (echo "<script>" etc).

    Not really a complaint, I'd just expect better from a commercial product that otherwise seems quite solid.

    Posted 12 years ago on Tuesday October 11, 2011 | Permalink