I have a bit of a weird problem that I can't seem to resolve. I'm trying to call a javascript function from a file outside of my smarty template directory and it doesn't seem to be working. In my smarty file, I have:
<script type='text/javascript' src= '../functions/editConcert.js'></script>
<form>
<input type="button" value="Edit Info" onclick="editInfo();">
</form>
And in my editConcert.js file, I have (for testing purposes):
function editInfo(){
alert("I get here");
}
My directory structure looks like this:
Classes
-FillConcertInfo.php (this calls the smarty display function)
Templates
-editConcert.tpl
Javascript
-editConcert.js
I cannot for the life of me figure out what's going on. It works fine in a normal php/html page but smarty seems to be throwing it out the wayside. Any help would be much appreciated.
EDIT: It should be worth noting that adding the following to my smarty template works, but I'd like to use an external file:
{literal}
<script>
function editInfo(){
alert("I get here");
}
</script>
{/literal}