|
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 |
noobie-php Smarty n00b
Joined: 23 Nov 2011 Posts: 4
|
Posted: Tue Nov 29, 2011 11:23 am Post subject: Cant get smarty values in javascript |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Tue Nov 29, 2011 2:49 pm Post subject: |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Tue Nov 29, 2011 3:37 pm Post subject: |
|
|
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 |
|
|
|
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
|