|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Member
Iscritto dal: Sep 2006
Messaggi: 208
|
[smarty+jquery] problema $
Salve sto usando da poco smarty come motore di template sto impazzendo con un errore stupido su questa porzione di codice:
Codice:
<link type="text/css" href="http://jqueryui.com/latest/themes/base/jquery.ui.all.css" rel="stylesheet" /> <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.4.2.js"></script> <script type="text/javascript" src="http://jquery-ui.googlecode.com/svn/tags/1.8rc1/jquery-1.4.1.js"></script> <script type="text/javascript" src="http://jquery-ui.googlecode.com/svn/tags/1.8rc1/ui/jquery-ui.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#datepicker").datepicker(); }); </script> purtoppo mi da errore : Fatal error: Smarty error: [in header.tpl line 6]: syntax error: unrecognized tag: $("#datepicker").datepicker(); (Smarty_Compiler.class.php, line 446) in C:\Documents and Settings\Administrator\Documenti\NetBeansProjects\modulo_prenotazioni\lib\Smarty\libs\Smarty.class.php on line 1093 penso che non capisca che $("#datepicker") è un'oggetto di jquery non un tag di smarty che ne dite???
__________________
CPU: Intel® Core™ i5-14600K MOTHERBOARD: MSI Z790 GAMING PRO POWER SUPPLY: Corsair RM850e (2023) RAM: CORSAIR VENGEANCE DDR5 RAM 32GB HD: Silicon Power 1TB US75 NVMe 4.0 Gen4 PCIe M.2 GPU: MSI RTX 4080 SUPER GAMING X TRIO |
![]() |
![]() |
![]() |
#2 |
Messaggi: n/a
|
Ma il framework viene richiamato nell'head della pagina?
Altrimenti è normale che non riconosca il simbolo "$". Se inoltre ci dovesse essere un problema di conflitto con altri framework JS come Prototype prova ad usare JQuery noConflict. http://docs.jquery.com/Using_jQuery_...ther_Libraries Ciao. |
![]() |
![]() |
#3 | |
Member
Iscritto dal: Sep 2006
Messaggi: 208
|
Quote:
Codice:
<link type="text/css" href="http://jqueryui.com/latest/themes/base/jquery.ui.all.css" rel="stylesheet" /> <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.4.2.js"></script> <script type="text/javascript" src="http://jquery-ui.googlecode.com/svn/tags/1.8rc1/jquery-1.4.1.js"></script> <script type="text/javascript" src="http://jquery-ui.googlecode.com/svn/tags/1.8rc1/ui/jquery-ui.js"></script> <script type="text/javascript" src="http://jquery-ui.googlecode.com/svn/trunk/ui/i18n/jquery.ui.datepicker-it.js"> </script> {literal} <script type="text/javascript"> $(function() { $("#datepicker").datepicker(); }); </script> {/literal} chissà se è una porcata???
__________________
CPU: Intel® Core™ i5-14600K MOTHERBOARD: MSI Z790 GAMING PRO POWER SUPPLY: Corsair RM850e (2023) RAM: CORSAIR VENGEANCE DDR5 RAM 32GB HD: Silicon Power 1TB US75 NVMe 4.0 Gen4 PCIe M.2 GPU: MSI RTX 4080 SUPER GAMING X TRIO |
|
![]() |
![]() |
![]() |
#4 |
Messaggi: n/a
|
Diciamo più che altro che è Smarty una porcata.
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 11:42.