Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2006
    Posts
    4
    Plugin Contributions
    0

    Default Javascript rollovers?

    The header in my site:

    http://www.mazelandglick.com/cart%20files/index.php

    Uses some HTML. The site owner would like rollovers, and has provided me with the script.

    Where can I find the <body> tag for my page?
    (so that I can preload the other button image)

    and

    Where Can I find the <head> tags
    (so that I can place the javascript commands there)


    Its obvious that I'm a newbie, but I appreciate all the help I can get.
    Thanks in advance!

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Javascript rollovers?

    Looked at your site and did not see any html for reference.

    Head & body tags per se are not there for editing as in php the actual page is constructed dynamically.

    You should start with includes/templates/template_default/sideboxes/tpl_categories.php and includes/language/english.php and insure that any edited file is placed into another folder that is inline with the override functionality of Zen Cart. This example is for the categories box:
    In the tpl_categories.php file find and replace with this.
    Code:
    zen_image($template->get_template_dir($box_categories_array[$i]['name'] . '.gif', DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . $box_categories_array[$i]['name'] . '.gif', $box_categories_array[$i]['name'])
    If you want to do rollovers, with javascript, or the CSS clipping method, you can add extra info the <img> tag along this line:
    Code:
    zen_image(image source file name, alt text, width, height, other parameters)
    Images are defined for the boxes in place of the text descriprion in the english.php file like for categories:
    Code:
    define('BOX_HEADING_CATEGORIES', 'your_graphic.jpg');
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Apr 2006
    Posts
    136
    Plugin Contributions
    0

    Idea or Suggestion Re: Javascript rollovers?

    man to find you body tag


    go to . temp/ur temp/ common/ tpl_main_page.php


    and just search "<body "

    you will find your solution


    visha DOT comp AT gmail DOT com

  4. #4
    Join Date
    Aug 2006
    Posts
    4
    Plugin Contributions
    0

    Re: Javascript rollovers?

    Holy Cow! I turned the template back to get some URLs and forgot to return it.

    Thank you for the notation for the <body> tag, That was very, very striaghtforward.

    THe Javascript scripts (as I understand them) work for the file:

    http://www.mazelandglick.com/shell.html

    with the following script:

    <csscriptdict import>
    <script type="text/javascript" src="CSScriptLib.js"></script>
    </csscriptdict>
    <csactiondict>
    <script type="text/javascript"><!--
    var preloadFlag = false;
    function preloadImages() {
    if (document.images) {
    over_RolloverImage = newImage(/*URL*/'http://mazelandglick.com/images2/ketubahs_button_b.jpg');
    over_RolloverImage2 = newImage(/*URL*/'http://mazelandglick.com/images2/ketubahs_button_b.jpg');
    over_RolloverImage3 = newImage(/*URL*/'http://mazelandglick.com/images2/ketubahs_button_b.jpg');
    over_RolloverImage4 = newImage(/*URL*/'http://mazelandglick.com/images2/ketubahs_button_b.jpg');
    preloadFlag = true;
    }
    }

    // --></script>
    </csactiondict>


    needs to go between the <Title> tag and the </head> tag.

    where can I find that?

    the zen page can be found at:

    http://www.mazelandglick.com/cart%20files/index.php

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Javascript rollovers?

    Here's how to get the code to automatically drop in between the <head> and </head> tags:
    http://www.zen-cart.com/wiki/index.p...verride_How-To
    .

    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. Rollovers
    By stevennestler in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 31 Jan 2013, 08:36 PM
  2. Javascript Rollovers In Header
    By giant_robot in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 17 Jun 2009, 01:00 AM
  3. Disjointed rollovers
    By naturesartandgifts in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 15 Nov 2008, 01:49 AM
  4. Cat Rollovers
    By IntelCos in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 11 Mar 2007, 12:06 AM

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