I have a somewhat strange dilemma. In my application, I need to have groups of parts. Each part, has between four and ten different checkboxes. This application is going to exist on a touch-screen monitor, so I want to use jQuery UI Button to turn the checkboxes into buttons since buttons would be easier to read and press than a checkbox. The problem is, i want each checkbox to have the same name so that when i pass the data as POST to my ajax handler, I can easily loop through them for their values which consist of partid-reasonid.
Since they all have the same name, jQuery UI seems to try to put them all into the same fieldset no matter how i try to call .button() on the fields. Here is a jsbin demonstrating the problem:
http://jsbin.com/ihavo3
I have tried both
- $('.errorbox').each(function(){
- $(this).button();
- });
and
both of which have the same results.
Any suggestions?
Edit: If i have to change the names and values of the checkboxes to get this to work, that's fine. at this point the entire app is in development an can be modified in any way, including the code to parse the data and insert into database. All i'm interested in atm is getting to display the toggle buttons per part on the page within the scrollable box