Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2010
    Posts
    3
    Plugin Contributions
    0

    help question implementing javascript across the site

    I have designed a java script document that utilises .css to replace native elements cross browser platform an want to implement it into the site for form elements only...

    I will be willing to share the script if anyone can come up with the answer as to where i would put my 'usual' head links

    i.e

    <link rel="stylesheet" href="forms.css" type="text/css" media="all" />
    <script type="text/javascript" src="jquery.js" ></script>

    i will share the code if you require it if an answer can be found!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: implementing javascript across the site

    There's lotsa documentation in the /docs/ folder of your Zen Cart files -- yes, the zip you downloaded.
    It's also located in the FAQs/Tutorials area.
    And there's also the wiki ...
    http://www.zen-cart.com/wiki/index.p..._-_Stylesheets
    http://www.zen-cart.com/wiki/index.p...s_-_Javascript
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Mar 2010
    Posts
    3
    Plugin Contributions
    0

    customer issue Re: implementing javascript across the site

    I have put my files into the relevant folders

    a_template_folder/css/stylesheet.css

    common/jscript/on_load/jquery.js

    common/jscript/on_load/my.custom.form.js

    and no results yet, I have read the documents and I'm still playing around for a few more hours I'll post back if i get results and share
    my results, thanks for replying

  4. #4
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: implementing javascript across the site

    As per the documents I mentioned, you'll need to rename your jquery.js file as jscript_something.js and your onload script to onload_something.js, and both need to be put into the proper foldernames. You've gotta follow the naming convention for it to work as described.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Mar 2010
    Posts
    3
    Plugin Contributions
    0

    customer issue Re: implementing javascript across the site

    yes I understood from the outset as with many systems like this, a structured naming convention is used but thanks al the same

  6. #6
    Join Date
    Feb 2008
    Posts
    1,336
    Plugin Contributions
    1

    Default Re: implementing javascript across the site

    You can load scripts in the html_header. just like you would do in any html template. Reference to the location in this file using the standard html link for css or jscript.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: implementing javascript across the site

    Quote Originally Posted by CoolCarPartsOnline View Post
    You can load scripts in the html_header. just like you would do in any html template. Reference to the location in this file using the standard html link for css or jscript.
    ... and it's only necessary to do that if you have very special requirements that won't work by simply putting the required files into the prescribed folders as discussed above.
    The idea behind making the folders and naming conventions available as automatic loads was to prevent you having to touch any template files when simply wanting to add javascript handling onto the page.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Changing the "Call for Price" Wording Across Entire Site
    By pattie1970 in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 3 Oct 2009, 12:44 PM
  2. Display 2 subcategories across and 3 products across per subcatagory
    By unclemantis in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 13 Sep 2009, 07:52 AM
  3. Implementing Javascript?
    By terpsnation in forum General Questions
    Replies: 3
    Last Post: 28 Sep 2008, 11:24 PM
  4. Implementing javascript on Worldpay Confirmation Page
    By knuckles199 in forum General Questions
    Replies: 0
    Last Post: 11 May 2006, 04:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg