tags:

views:

58

answers:

3

This might seem a very noob question but I haven't found the answer yet. I have a header.tpl file which contains xhtml code. I want to and some java script to it using jquery. But my problem is that it simple doesn't happen what I tell it to do. Because the page hoster comiples php with SMARTY I had to make a small change to the block script, which was had the {literal} {/literal}. But the rest seems ok. Btw the jquery.js is on the same folder as the header.tpl.

File header.tpl http://feupload.fe.up.pt/get/SQWJvybQkDCmjEG

PS: I event replaced all the code by the getstarted tutorial on the jquery homepage and added the {literlar} {/literal} (otherwise it would give an error) and it steel didn't work

A: 

Smarty is only a templating language that prepares your HTML. Ignore PHP and Smarty for the moment. What you need to look at is the finished HTML product as it appears in your browser. It is likely that there are JavaScript errors that you can easily look at in Firefox's error console for example.

Try to find and post the relevant parts in the finished HTML code and look whether everything is in order there.

Pekka
A: 

it seems that when you are in the server you still need to add to the file the path of folder which is on even if the file referring to it is on the same folder...sorry guys

out_sider
A: 

why not just make another js file with your jquery stuff in it that you load in so you don't have to worry about how it works or doesn't work in smarty ?

mcgrailm