2010-09-08 79 views
0
{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} 

此脚本在服务器上运行良好,但是当我在smarty模板中使用它不起作用。 任何人都可以解释。JavaScript文件doesnot加载smarty

谢谢

+0

smarty模板? – Bala 2010-09-08 12:30:54

+0

是的脚本不加载smarty模板..你有任何想法Ÿ。 – farkhunda 2010-09-08 12:39:32

回答

0

我想通了。 js文件将参考调用模板的PHP文件进行调用。该路径不会根据smart y模板的位置而是根据调用的php文件的位置而定。

谢谢