Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [smarty] js w smarty, problem nie dziala
noc_nik
post
Post #1





Grupa: Zarejestrowani
Postów: 95
Pomógł: 0
Dołączył: 24.06.2003
Skąd: Kielce

Ostrzeżenie: (0%)
-----


Witam mam taki problem ze w pliku tpl umieszczam js

  1. <script language="JavaScript" type="text/javascript">
  2. var menus = [
  3. new ypSlideOutMenu("menu1", "down", 1, 29, 185, 230),
  4. new ypSlideOutMenu("menu2", "down", 185, 29, 185, 264),
  5. new ypSlideOutMenu("menu3", "down", 370, 29, 185, 240)
  6.  
  7. ]
  8.  
  9. for (var i = 0; i < menus.length; i++) {
  10. menus[i].onactivate = new Function("document.getElementById('act" + i + "').className='active';");
  11. menus[i].ondeactivate = new Function("document.getElementById('act" + i + "').className='';");
  12. }
  13.  
  14. ypSlideOutMenu.writeCSS();
  15.  
  16. </script>


no i oczywiscie :

Fatal error: Smarty error: [in menu2.tpl line 46]: syntax error: unrecognized tag: menus[i].onactivate = new Function("document.getElementById('act" + i + "').className='active';"); menus[i].ondeactivate = new Function("document.getElementById('act" + i + "').className='';"); (Smarty_Compiler.class.php, line 455) in c:\usr\krasnal\www\sg\Smarty.class.php on line 1092


a jak umieszcze

  1. <script language="JavaScript" src="menu2.js" type="text/javascript"></script>


to nie dziala łaj ?smile.gif


--------------------
:)
Go to the top of the page
+Quote Post

Posty w temacie
- noc_nik   [smarty] js w smarty   2.04.2009, 10:18:21
- - nospor   literal http://www.smarty.net/manual/en/language.f...   2.04.2009, 10:23:00
- - ts23   albo w zewnętrzny skrypt   2.04.2009, 10:26:49


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 07:58