in reply to Re^2: Problems with CGI script behaviour
in thread Problems with CGI script behaviour

They are grouped by name. They don't care one bit how the table is laid out beneath them, all the care about is the <input name="something">. Really, check the HTML source to debug.

But, I think your problem might be that you are having multiple boxes set as checked when generating the HTML.

...row1 <td><label><input type="checkbox" name="DOL" value="Ja" />Ja</label> +<label><input type="checkbox" name="DOL" value="Nej" checked="checked +" />Nej</label></td> ...row2 <td><label><input type="checkbox" name="DOL" value="Ja" />Ja</label> +<label><input type="checkbox" name="DOL" value="Nej" checked="checked +" />Nej</label></td>

So the name attribute matches but there are multiple checked. The browsers are required to pass each and every checked checkbox back. Did you want to use radio buttons or check buttons? (Even with radio buttons you might have these kinds of problems if the HTML you supply has multiple checked.)

I'm not really sure what you want since the code currently is fairly complex. You would benefit much if you made a new SOPW post with the bare minimum of code relevant to your problems, preferably one at a time. That, or create a HTML page with mere radio buttons / checkboxes and muck around it until it works. Then try to integrate that with your existing code.

BTW, having two submit buttons with the same name (spara) doing different things (saving and adding rows) is likely to lead to problems later on.

Replies are listed 'Best First'.
Re^4: Problems with CGI script behaviour
by SerZKO (Beadle) on Aug 02, 2012 at 10:17 UTC

    Thanks man.

    The reason I have multiple values checked for a GRU name is that I read the result in a hash with multiple values, and that's exactly what I want.

    However, I don't want it for CMG and DOL names, but there radio buttons does not work.

    And I'll listen to your advice to post a minimum in a new SOPW post.

    Cheers !