Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2006
    Posts
    23
    Plugin Contributions
    0

    help question Scriptaculous, sIFR and basically JS includes issues

    Zen-Cart 1.3.7.1 (current as of now)
    PHP 4.3.11 MySQL 4.1.22
    Linux Apache server with Godaddy

    Location: http://dev.michele-co.com
    Custom theme with all the overrides

    I think the problems are related so I think I can roll them into one ball of wax.

    I uploaded my JS files to my template jscript folder and renamed them jscript_name. I see that they do get loaded in the HEAD as they should.

    But with both Scriptaculous and sIFR they work in conjunction with other files. I have aimlessly tried these files in different places and really don't know if they are found or how to test (other than I never get them to work). Is Zen-Cart doing something here? It would make sense to me that the ZC environment could be throwing something off.

    For instance I have JS in an href:
    Code:
    <a href="javascript:new Effect.toggle('contact', 'SlideDown');">
    I'm not real handy in JS, but as far as I can tell that should work.

    Scriptaculous uses other files for its libraries... I am unsure if they need the same treatment as the primary script files (to be loaded in the HEAD, a thing I doubt) or uploaded as-is to the jscript folder or somewhere else. I really don't know what the point of reference is for paths called from the scripts.

    I'm also unsure if my SWF file for sIFR is ever found, even when I use a full path. Bottom line is nothing seems to want to work, yet I have used them successfully in other web programs.

    I know people get skiddish when there is 3rd party code involved, but both Scriptaculous and sIFR are very widely used and there are minimal alternatives. I think it would be healthy for ZC to document their use (something I would do myself if I could figure this out).
    I've been Zenened, and I've got Tylonol.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Scriptaculous, sIFR and basically JS includes issues

    If you need your .js files to load on every page, then put them in your template's jscript folder, named jscript_*.js

    Then in your HTML, use the calls to the js functions as needed. The a href you quoted appears to be reasonably appropriate.

    If you need to access swf files, you'll have to insert the appropriate HTML to load the swf file. Note that the path you specify to find the swf file will be relative to your Zen Cart store "root" ... ie: relative to the same folder where your index.php file is located. So, if you put your .swf file in the images folder, then you could call your swf file via "images/myfile.swf" etc.
    .

    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. Problems with includes/config.php and admin/includes.php
    By Scott83 in forum Basic Configuration
    Replies: 2
    Last Post: 23 Oct 2009, 07:09 PM
  2. Can I add scriptaculous blinddown effect to my checkout?
    By touchclothing in forum General Questions
    Replies: 1
    Last Post: 21 Sep 2009, 07:43 PM
  3. sIFR and zen cart
    By jvanree in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 3 May 2008, 08:32 AM
  4. difference between \includes and \admin\includes
    By arnold931 in forum Basic Configuration
    Replies: 5
    Last Post: 27 Aug 2007, 01:55 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR