Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2006
    Location
    West Virginia
    Posts
    321
    Plugin Contributions
    1

    Default Floating button using .js script help

    Hello, I am wanting to add a floating menu to my website and I cant get it to work. Im trying to alter/add some script and image I found HERE and just use the back to top portion. Anyway I read the /docs/read_me_jscript file on how to add jscript to your template but im getting something wrong. Im using my My_Template/common/tpl_main_page.php file and it says to add the following code just before the </BODY> so I altered the code so it would call the file from My_template/jscript folder.

    THIER CODE:
    Code:
    <script language="JavaScript" type="text/javascript" src="floating_menu.js"></script>
    ALTERED CODE:
    Code:
    <script language="javascript" src="includes/templates/pure_black/jscript/jscript_floating_menu.js"></script>
    Now I opened the .js file and am only going to use the back to top portion so I altered the section so it would point to the image in my MY_Template/images folder.

    Code:
    document.write('<a href="#top"><img src="includes/templates/pure_black/images/float3-top.gif" border="0" vspace="1"></a><br>');
    I am getting nothing on my site What am I doing wrong? I know it has to do with where and how im adding the script to my tpl_main_page.php

    Thanks!

  2. #2
    Join Date
    Aug 2006
    Location
    West Virginia
    Posts
    321
    Plugin Contributions
    1

    Default Re: Floating button using .js script help

    Ok I got the image to show now by removing the words "jscript" from the ALTERED CODE but I still cant get it to float with the window and link to the top of page. Any ideas?

  3. #3
    Join Date
    Aug 2006
    Location
    West Virginia
    Posts
    321
    Plugin Contributions
    1

    Default Re: Floating button using .js script help

    OK I got it to work using different script and here is what I did in case someone needs this. First open the .js file with an editor and change the YOUR_TEMPLATE in line #14 to the template name your using. Next open your tpl_main_page.php and change the YOUR_TEMPLATE in line #69 to the template name your using. Thats it.... I used the js script from DynamicDrive.
    Attached Files Attached Files

  4. #4
    Join Date
    Aug 2008
    Posts
    1
    Plugin Contributions
    0

    Default Re: Floating button using .js script help

    Thanks for posting this, it works great. The only change I would make is if someone like me who has a modified tpl_main_page, then you would need to copy this piece of code on line 69 -

    <!-- Floating Script Start -->
    <script language="javascript" src="includes/templates/store/jscript/floating_menu.js"></script>
    <!-- Float END -->

    to line 69 in the modified tpl_main_page file. Everything else remains the same.

    You should post this as a Zen cart addon, as I'm sure I'm not the only one with this need.

  5. #5
    Join Date
    Aug 2006
    Location
    West Virginia
    Posts
    321
    Plugin Contributions
    1

    Default Re: Floating button using .js script help

    handy, thanks.... I didn't come up with the code. If you want you can up it to ZenCart Addons.... Good Luck!

 

 

Similar Threads

  1. help with header image links are floating over logo
    By pocketpenny in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Aug 2010, 07:38 AM
  2. Script for floating the large image over smaller images on product info page
    By sjk1000 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 20 Mar 2010, 10:17 PM
  3. Upgrade using host script
    By TyrellCorp in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 27 May 2008, 09:35 PM
  4. Buy button and price is floating around??
    By jagge in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 11 Jan 2008, 01:53 AM
  5. Text floating.. help
    By lillen69 in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 8 Sep 2006, 06:29 PM

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