 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
chamalo Smarty Rookie
Joined: 22 Jul 2008 Posts: 12
|
Posted: Thu Aug 14, 2008 6:08 pm Post subject: Probleme de variables JS/Smarty |
|
|
Bonjour,
J'utilise un site utilisant les smarty, afin de rendre mon site plus ergonomique, j aimerais faire un onmouseover pour voir en grand les images qui sont présentées en miniatures sur le site!
J ai trouvé un script javascript qui semble parfait pour ca! toutefois, j ai un probleme de variable.. ma page html présentant les differentes photos est générée automatiquement a partir d un script php, lequel se base sur un script tpl à appliquer pour la création de chaque élément html
Ma variable JS n est pas interprétée par le moteur smarty! comment la rendre interprétable?
En cadeau un petit bout de code
Le javascript définissant mon event!
| Code: |
messages[0] = new Array('../imagelarge.php?productid=$productid','<center>$product</center>');
|
Le smarty demandant d'utiliser l'event
| Code: | | <img src="/image.php?productid={$productid}&tmp=y" onmouseover="doTooltip(event,0)" onmouseout="hideTip()" class=ThumbDisplay width={$image_x} height={$image_y} alt="{$product}" border=0> |
{$product} et {$productid} sont bien définis en smarty, mais pas en javascript! Si quelqu'un peut m aider!!!
Merci d avance |
|
| Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|