|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
lan19 Smarty Rookie
Joined: 18 Mar 2011 Posts: 12
|
Posted: Sat May 10, 2014 10:31 pm Post subject: Assigner variable dans javascript |
|
|
Bonjour,
J'ai un fichier tpl comme suit :
Code: |
{literal}
<script type="text/javascript">
var options = {
script:"test.php?json=true&",
limit:5,
json:true,
cache:false,
};
</script>
{/literal}
|
Je voudrais remplacer la valeur 5 par une variable déja assignée {$value}.
J'essaie :
Code: |
{literal}
<script type="text/javascript">
var options = {
script:"test.php?json=true&",
limit:{ldelim}{$value}{rdelim},
json:true,
cache:false,
};
</script>
{/literal}
|
mais le script ne marche pas.
Comment remplacer cette valeur par cette variable ?
Merci par avance pour toutes les réponses à venir. |
|
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
|