Help on Dynamic Checkbox Forms

They have: 1 posts

Joined: Apr 2011

Hi guys,

I am relatively new to web programming so any help would be greatly appreciated.

I have a Java Servlet back-end and HTML and CSS front-end. I have a list of information that I want to be displayed to the user as checkboxes. (Btw, I am displaying information using JSTL tags embedded in HTML). However, this length of this list of information can vary and therefore, I can't simply have a static number of checkboxes.

I assume the checkboxes will look like: <input type="checkbox" name="..." value="..."/>

My question is: on the back-end side, how do I know which checkbox has been clicked on since I don't know beforehand what will be in the value-attribute of the input tag.

When sending information via an HTML form, if the user clicks on multiple checkboxes how does that information get sent? Does it append the values of the checkboxes in a message to the web server?

Any insight would greatly help and also, please let me know if I need to use other tools, such as Javascript to get this done. If so, a detailed explanation would be so helpful.

Thanks.