![]() |
Can you add the javascript as an include and have the whole javscript as a separate file?
such as: Code:
<script language="JavaScript1.2" src="myjavascript.js"></script>Funkydunk |
Quote:
The script I paste into my html's looks like this: Code:
<SCRIPT LANGUAGE="JavaScript">I tried pasting it directly into the poweredby.tpl and the smarty errors came. :? |
Try this:
Code:
{literal} |
WOOHOO!
It worked! :D THANK YOU FUNKY :!: :!: What is the {literal} for? |
It just tells smarty to keep its mitts off the code and show exactly what is written. The problem is in the { brackets which smarty then tries to substitue code/variables etc.
Great to be of help. Funkydunk |
ArmyNavy - adding javascript within a tpl
I think other have gone off at a tangent
all you have to do is add the line: {literal} at the beginning of your javascript and finish off with {/literal} what this does is tell smarty to ignore everything inside the brackets - i.e to read it (javascript) literally, Chris |
absolutely.
8) |
seaCost, ArmyNavy,
you can mix smarty and javascript together using the {literal} {/literal} tags describe by Ian. Here is an example; Ignore the lines begining with "//alert", they are just for variable debuging. Quote:
Regards, |
Many thanks, Syddos. As soon as I saw that "literal" thing, I knew that's what we were looking for. More Smarty stuff...
:) :) |
I've been using PHPLiveSupport from http://www.phplivesupport.com/ on my site for quite some time for the chat functionality. Very, very easy to integrate, and I get a ton of customers online using it. I forget the fee, but the software is like $100 one-time-fee, so it's not hosted, and you don't pay a recurring fee.
If you'd like to see a live example, you can visit my site at www.aostuff.com. Take care, Nick |
| All times are GMT -8. The time now is 02:55 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.