Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

abount customers function

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
chiayi
Smarty n00b


Joined: 07 Aug 2003
Posts: 2

PostPosted: Thu Aug 07, 2003 9:22 am    Post subject: abount customers function Reply with quote

{%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
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Aug 07, 2003 9:35 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
chiayi
Smarty n00b


Joined: 07 Aug 2003
Posts: 2

PostPosted: Thu Aug 07, 2003 9:47 am    Post subject: $FORM_NAME Reply with quote

the $FORM_NAME is assigned from php
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Aug 07, 2003 9:51 am    Post subject: Reply with quote

hmm, then the value should be interpolated correctly (at least since Smarty version 2.4.0 AFAIK)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP