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

Appending html row to div/table on add row button click

 
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
nevpro
Smarty n00b


Joined: 20 Jan 2020
Posts: 1

PostPosted: Mon Jan 20, 2020 7:28 am    Post subject: Appending html row to div/table on add row button click Reply with quote

Hi I am new in smarty . I have created the drop down using below code

{html_options name=category options=$category selected=$mySelect}

Now I want to append same drop down to div or table as a next row on 'add more' button click.
Back to top
View user's profile Send private message
bsmither
Smarty Elite


Joined: 20 Dec 2011
Posts: 322
Location: West Coast

PostPosted: Mon Jan 20, 2020 5:32 pm    Post subject: Reply with quote

Changing the HTML the HTML that the browser is showing is accomplished by using javascript to attach an event listener to the 'add more' button and then have javascript code (such as jQuery functions) add the HTML.

You would identify the source and target HTML by its name, "category".

Smarty works on templates at the web server, and javascript works in the web browser. So, Smarty is not available at your web browser.
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 -> 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