try this...
You need to store the label string value as a hidden field in the add to cart form, setting a default value, (this value is only updated onchange in this example).
eg <input type="hidden" name="label" value="Small" >
In this example, the list/menu is called listsize and calls a js function called 'getlabelstring' as follows....
<select name="listsize" onchange="getlabelstring()">
<option value="10">Small</option>
<option value="20">Medium</option>
<option value="30">Large</option>
</select>
the javascript function to retrieve the list label should go in the head section of your page.
the function has the general structure as below, just substitute the formname, listbox name and hidden fields accordingly
document.formname.label.value=document.formname.listbox.options[document.formname.listbox.selectedIndex].text
in this example, my add to cart form is called gallerybasket_1_ATC_<?php echo $row_rsdetail["ID"]; ?> the listbox is called listsize, the label is called label, so the function is like this...
<script type="text/javascript">
/* <![CDATA[ */
function getlabelstring(){
document.gallerybasket_1_ATC_<?php echo $row_rsdetail["ID"]; ?>.label.value = document.gallerybasket_1_ATC_<?php echo $row_rsdetail["ID"]; ?>.listsize.options[document.gallerybasket_1_ATC_<?php echo $row_rsdetail["ID"]; ?>.listsize.selectedIndex].text;
}
/* ]]> */
</script>
now set the size in the add to cart behavior... $ATC_itemSize = "".$_POST["label"] ."";// column binding#
if you wish to display the price as well as the size in the list label, eg
<select name="listsize" onchange="getlabelstring()">
<option value="10">Small ($10.00)</option>
<option value="20">Medium ($20.00)</option>
<option value="30">Large ($30.00)</option>
</select>
you would need to do some string manipulation to extract the appropriate substring from the label.
eg to extract all characters until the space
<script type="text/javascript">
/* <![CDATA[ */
function getlabelstring(){
var firstbit = document.gallerybasket_1_ATC_<?php echo $row_rsdetail["ID"]; ?>.listsize.options[document.gallerybasket_1_ATC_<?php echo $row_rsdetail["ID"]; ?>.listsize.selectedIndex].text;
firstbit = firstbit.split(" ");
document.gallerybasket_1_ATC_<?php echo $row_rsdetail["ID"]; ?>.label.value = firstbit[0];
}
/* ]]> */
</script>
(I haven't tested this if js is disabled, the price will still calculate ok, but I presume that the size info from the label will not.)
:)