On Sat, 2006-01-14 at 13:38 -0800, Bob Ippolito wrote:

> Even still, setNodeAttribute takes three arguments, not two.  You  
> need to do setNodeAttribute(checkbox, "checked", "checked");
> 

Good point.

But this does not apear to work...

for(var o in DataDisplay){
        if(DataDisplay[o].displayed){
                var option = OPTION({'class':'sortOption'}, o);
                if(o == sort_field){
                        setNodeAttribute(option, 'selected','selected');
                }
                sort_fields.push(option);
        }
}
var select = SELECT(null, sort_fields); 

This is a minor irritation, and if it cannot be done, it cannot be done.
But it would be nice.

This works...
var option;
if(o == sort_field){
  option = OPTION({'class':'sortOption', 'selected':'selected'}, o);
}else{
  option = OPTION({'class':'sortOption'}, o);
}
sort_fields.push(option);

cheers
Worik

> -bob
> 

Reply via email to