I think that the way you are trying to implement this will be difficult. There may be an easier way to get the values together but you will still need to have some custom js to sort it out properly.
For example in the code you posted it looks like the color id is the current value and the color name is the label. You can add in other recordset value for either the value or the label. So you could have the color id, size, and price all in the value. Here is what that would look like in your code:
echo "WAJA[".$n."][".$m."][0] = "."'".WA_DD_Replace($row_sizesRS["colorID"] . "," . $row_sizesRS["colorprice"] . "," . $row_sizesRS["colorsize"])."'".";\n";
echo "WAJA[".$n."][".$m."][1] = "."'".WA_DD_Replace($row_sizesRS["color_name"])."'".";\n";
This would give you the id, price, and size for the value of the select list. You would then need to come up with the custom js that will parse these values and apply them to other hidden form elements. You can then just bind the eCart columns with these other hidden form elements that hold the correct value for that column in the cart.