X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Javascript dropdown menu (https://forum.x-cart.com/showthread.php?t=260)

Anonymous 10-11-2002 09:58 AM

Javascript dropdown menu
 
I'm trying to implement a Java script drop down menu in the Head.tpl. The only thing that I end up with is a blank where the menu should be. IБ─≥ve placed the call to the JS in between the {literal} {/literal} tags. Any ideas?

Thanks ahead of time!

syddos 10-11-2002 03:20 PM

Quote:

Originally Posted by suncresrcomputers
I'm trying to implement a Java script drop down menu in the Head.tpl. The only thing that I end up with is a blank where the menu should be. IБ─≥ve placed the call to the JS in between the {literal} {/literal} tags. Any ideas?


Hi,

when you say that you placed the call to the javaScript, I assume you mean something like this:
{literal}
<SCRIPT language=javascript1.2 src="http://www.your_website/file_name.js"></SCRIPT>
{/literal}

If so, have you entered the full URL to the .js file?

Regards,

Anonymous 10-11-2002 09:24 PM

That's it.
 
Yep! Thats what the call basically looks like... I do have the full path to the JS.

syddos 10-11-2002 10:12 PM

Hi,
it's diffcult to guess what's hapening without seeing or having detaild info, however you could try putting the javascript file into a template file e.g

{* ID: my_javacsript_file_js.tpl, my menu file *} file name and description

{literal}

<script language=javascript1.2 type="text/javascript">

YOUR JS CODE

</script>

{/literal}



then in the template file customer/home.tpl
put:

{include file="your_js_script.tpl"}

in the HTML TABLE cell where you want the script to be placed.

DON'T FORGET TO CHECK FILE PERMISSIONS ON THE JS FILE, this could also prevent the file from being read remotely (from a browser request)

Regards,


All times are GMT -8. The time now is 08:01 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.