|
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 |
chiayi Smarty n00b
Joined: 07 Aug 2003 Posts: 2
|
Posted: Thu Aug 07, 2003 9:22 am Post subject: abount customers function |
|
|
{%html_select_city option_add = '1' all_extra='class="smooth" onChange="genZone(document.$FORM_NAME, this)"'}
This is my customer function,but the $FORM_NAME cant get the right value
Can someone help? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Aug 07, 2003 9:35 am Post subject: |
|
|
is your $FORM_NAME a javascript-variable so "$FORM_NAME" should be printed in the template literally?
then you have to escape the $-sign with a backslash (just like in php in double quotes):
...nZone(document.\$FORM_NAME, this)...
or use single quotes instead of double-quotes to prevent variable interpolation (also: just like in php)
greetings
messju |
|
Back to top |
|
chiayi Smarty n00b
Joined: 07 Aug 2003 Posts: 2
|
Posted: Thu Aug 07, 2003 9:47 am Post subject: $FORM_NAME |
|
|
the $FORM_NAME is assigned from php |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Aug 07, 2003 9:51 am Post subject: |
|
|
hmm, then the value should be interpolated correctly (at least since Smarty version 2.4.0 AFAIK) |
|
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
|