|
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 |
smarty1 Smarty n00b
Joined: 25 Feb 2018 Posts: 3
|
Posted: Mon Mar 19, 2018 11:49 pm Post subject: Post back issue |
|
|
Hi.
I have a php function fire via ajax call when dropdown1 has on change event.
I get in an alert message the response shown from the php query result set
however I cannot put that result into my dropdown2 control. Any suggestions please? I have this all working in a .tpl file.
Thanks so much!! |
|
Back to top |
|
bsmither Smarty Elite
Joined: 20 Dec 2011 Posts: 322 Location: West Coast
|
Posted: Tue Mar 20, 2018 2:18 am Post subject: |
|
|
This is "chained selects" and is javascript powered. This all happens in the user's browser, and is past the point of Smarty compiling the template.
See: https://appelsiini.net/projects/chained/
The only aspect of this that Smarty would get involved is if you had several templates to choose from, and had Smarty compile the chosen template to HTML, to have that HTML as the return to the AJAX call. The choice of template could be a series of <option> tags, a series of radio buttons, a series of checkboxes, etc. |
|
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
|