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

Cant get smarty values in javascript

 
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 -> Smarty Development
View previous topic :: View next topic  
Author Message
noobie-php
Smarty n00b


Joined: 23 Nov 2011
Posts: 4

PostPosted: Tue Nov 29, 2011 11:23 am    Post subject: Cant get smarty values in javascript Reply with quote

ok here is the snippet of my code i cant get values like POST type or Request Type in my smarty code.
alert("{$smarty.request.phone}");
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Tue Nov 29, 2011 2:49 pm    Post subject: Reply with quote

it should work, can we see the HTML browser source that is rendered? Also, is there a value in PHP for $_REQUEST['phone'] ?
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Tue Nov 29, 2011 3:37 pm    Post subject: Reply with quote

It looks like that 'alert("{$smarty.request.phone}");' is located in the PHP script. at PHP script level you can't access a template variable like {$smarty.request.phone}
Back to top
View user's profile Send private message
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 -> Smarty Development 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