My JSP web page has many checkboxes.
What is web page source code look like when clicking one checkbox will submit only one checkbox value (not the whole form) immediately?
i.e. toggling one checkbox will send the info that only that checkbox is toggled.
This does not work because clicking one checkbox will send the whole page
<form name="myform" method="post">
<input type="checkbox" name="choice" value="1" onclick="submit();">
<input type="checkbox" name="choice" value="2" onclick="submit();">
<input type="checkbox" name="choice" value="3" onclick="submit();">
...

This does not work because clicking one checkbox will send the whole page

If you just want to submit a part of the page (not the entire whole page), then you have to use an XmlHttpRequest object (AJAX).

Any sample source code? Especially those with the Prototype library.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.