Well, I got this... partially.
// Draw first option dropdown with all values
if(sizeof($attributes[0]['ovals']) > 1) {
$out.='<tr><td align="right" class=main><b>'.'<!-- XXX' . sizeof($attributes[0]['oname']) . ' -->'.
$attributes[0]['oname'].
":</b></td><td class=main>".
tep_draw_pull_down_menu('id['.$attributes[0]['oid'].']',
array_merge(array(array('id'=>0,
'text'=>'First select '.$attributes[0]['oname'])),
$attributes[0]['ovals']),$attributes[0]['default'],
"onchange=\"i".$attributes[0]['oid']."(this.form);setDetail(this.form);return false;\"").
"</td></tr>\n";
} else {
$out.='<tr><td align="right" class=main><b>'.
$attributes[0]['oname'].
":</b></td><td class=main>".
tep_draw_pull_down_menu('id['.$attributes[0]['oid'].']',
$attributes[0]['ovals'],
" ",
"disabled\"").
"</td></tr>\n";
}
// Draw second to next to last option dropdowns - no values, with onchange
for($o=1; $o<sizeof($attributes)-1; $o++) {
$out.='<tr><td align="right" class=main><b>'.$attributes[$o]['oname'].":</b></td><td class=main>".tep_draw_pull_down_menu('id['.$attributes[$o]['oid'].']',array(array('id'=>0, 'text'=>'Next select '.$attributes[$o]['oname'])), '', "onchange=\"i".$attributes[$o]['oid']."(this.form);setDetail(this.form);return false;\"")."</td></tr>\n";
}
It's the "Draw second to next to last option dropdowns - no values, with onchange" loop that has been a lot tougher. I want to do the same thing as in the first option, display the dropdown, item selected, dropdown disabled. Tips?