I have a form on a simple web page that has a series of checkboxes. These options represent items that may be retrieved from a database upon clicking the submit button. In addition, there is a place to add an extra option to the page at the bottom. Here is what I am going for:
I would like to be able to add the new option using javascript, so that it show up quickly and seamlessly to the user, rather than having to send the request back to the server and add it server-side, then have the user reload the page. However, I also want to make sure that these added fields are preserved so that the next time I load the page, they show up.
Unfortunately, my code is proprietary, so I cannot post it here. I hope that people can help me this some ideas without having to actually see the code.
Thanks
When these checkboxes are added you don’t want to go the server but when user presses submit you are anyways going to server, so at that time you can persist this information about new checkboxes on server.
Another option is to call to server asynchronously using AJAX to update the server about the state change.