Try prompt="Please Select".

- Gordon

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of digital_eyezed
Sent: Wednesday, June 29, 2005 8:30 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: ComboBox 'Please Select' first Item

Thanks,

Added this and it worked:

function addSelect(event){
                         var theTargetId = event.target;
                         theTargetId.addItemAt(0,"Please Select",0);
                         theTargetId.selectedIndex = 0;
}

Small typo in yours, its addItemAt not addItemsAt, took me a wee 
while to notice it.

Best Regards,

Iain



--- In flexcoders@yahoogroups.com, Clint Modien <[EMAIL PROTECTED]> wrote:
> Should be 
> 
> function addSelect(event){
> var theTarget = event.target <http://event.target.id/>;
> theTarget.addItemsAt(0,new Array([{label:"Please Select",data:0}]);
> }
> 
> Or the easiest way would be to add the Item to the result when you 
get it 
> back
> 
> event.result.push({label:"Please Select", data:0});
> 
> the "label" and "data" properties of the object should coincide 
with the 
> properties of your VO
> 
> if you can give me the definition of the VO maybe I can elaborate
> 
> On 6/29/05, digital_eyezed <[EMAIL PROTECTED]> wrote:
> > 
> > Hi,
> > 
> > How do I have the first item in the combobox read 'please select'
> > with a corrosponding data value of 0(zero). The rest of the 
combobox
> > should be filled with a return from a remote object call and the
> > resulting VO objects (with label / Data pairs).
> > 
> > I can fill the comboBox with the VO's no problem, but How do I 
add
> > the 'Please Select'?
> > 
> > I have tried this function on the creationComplete event of the
> > Combobox:
> > 
> > function addSelect(event){
> > var theTargetId = event.target.id <http://event.target.id>;
> > theTargetId.addItemAt(0,"Please Select",0);
> > }
> > 
> > any help most appreciated.
> > 
> > Regards,
> > 
> > Iain
> > 
> > 
> > 
> > 
> > --
> > Flexcoders Mailing List
> > FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.com
> > Yahoo! Groups Links
> > 
> > 
> > 
> > 
> > 
> > 
> >




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to