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

Assign Smarty variable from Javascript variable

 
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 -> Feature Requests
View previous topic :: View next topic  
Author Message
dextranovich
Smarty n00b


Joined: 19 May 2018
Posts: 3

PostPosted: Sun May 20, 2018 11:14 am    Post subject: Assign Smarty variable from Javascript variable Reply with quote

Hello everyone,

I have the following code in my template file:
Code:
<input type="radio" name="AcceptTerms" id="AcceptTerms" value="Ja/Nein" />Ja/Nein
                             [{oxscript add="$('#AcceptTerms').change( function() { var radioButton = 'Ja';
                            console.log(radioButton);
                            });"}]


Now, in console when the radio button is clicked, I have 'Ja' printed, but I want to pass it's value into smarty variable because I will send it as a parameter in php function.

Is this possible and how I can do that?

Thank you
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sun May 20, 2018 1:44 pm    Post subject: Reply with quote

https://www.smarty.net/forums/viewtopic.php?p=93377
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 -> Feature Requests 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