views:

17

answers:

1
 {literal}
<SCRIPT LANGUAGE="JavaScript" 
         SRC="../calendar/weeklycalendar.js">

</script>
<script>

    // call the function to build the calendar

    // function's param specify the first day of week 

    // 0=Sunday, 1 = Monday, ..., 6=Saturday
alert("before");
    buildWeeklyCalendar(1);
            alert("afetr");

</script>
{/literal}

this script runs fine on server but when i use it in smarty template it doesn't work. Can anyone explain.

Thanks

A: 

I figured it out. The js file will be called with reference to the PHP file that calls the template . The path will not be according to where the smart y template is but according to where the calling php file is.

Thanks

farkhunda