开发者

How build a list dynamically and pass/save user selected values from an HTML form to server?

开发者 https://www.devze.com 2023-01-20 06:08 出处:网络
I think in this case I need to开发者_如何学运维 write a client side script that onpageload/onchange gets options from server & builds a list dynamically. & stores new options to server via som

I think in this case I need to开发者_如何学运维 write a client side script that onpageload/onchange gets options from server & builds a list dynamically. & stores new options to server via some JavaScript script. I will prefer to save user input in a file on server. I will be very thankful for any help.


Here is the stack we use for our web app and that works more or less the way you describe:

  1. the user load an HTML page
  2. the page make an ajax call and get the options as a JSON(either it exists already in the database, or a new option set is generated)
  3. the json is rendered using a JS templating engine (PURE in our case)
  4. the user change something
  5. the same JSON is modified and sent by a POST to the server
  6. the server read that JSON and store it in the database(you would write the data to your file). And then go back to the step 4, to wait for another user change.
0

精彩评论

暂无评论...
验证码 换一张
取 消