ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Where to store javascript files

July 11, 2008 7:26pm

Subscribe [3]
  • #1 / Jul 11, 2008 7:26pm

    kriz

    231 posts

    Hello,

    Where do you all store your javascript files? at {site_url}javascripts/ or other?

    And is this the right code that goes onto the html header:

    (script src="{site_url}javascripts/prototype.js" type="text/javascript")(/script)

    * Substitute () for <>. The forum doesnt accept [removed] tags

  • #2 / Jul 13, 2008 6:27pm

    joann22

    176 posts

    yeah, that’s fine… why do you ask?

  • #3 / Jul 24, 2008 3:21pm

    mmcclung

    172 posts

    this approach doesn’t appear to be correct.

    i’m looking for the proper code to emulate ‘stylesheet=’ as in

    <pre><code><style type=‘text/css’ media=‘screen’>@import “{stylesheet={my_template_group}/mysite_styles}”;</style></code></pre>

    only for mysite.js

    the {site_url} call listed above doesn’t append index.php?etcetcetc

  • #4 / Jul 24, 2008 3:27pm

    Ingmar

    29245 posts

    You could alaways use {path=}, I suppose.

  • #5 / Jul 24, 2008 3:47pm

    mmcclung

    172 posts

    (script src=”{path=site/mysite.js}” type=“text/javascript”)

    renders as

    (script src=“http://mysite.pmhclients.com/index.php/site/mysite.js/” type=“text/javascript”)

    which looks to be the correct usage of {path=} but that doesn’t render the js file.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases