[jQuery] Re: selectbox: change selected item

2007-07-17 Thread zenx
Klaus, Dan, thank you for your help. I tried both ways and they worked correctly. I think I will use the Field plugin for many things in the future. Thank you! On 17 jul, 18:37, Klaus Hartl <[EMAIL PROTECTED]> wrote: > Mike Alsup wrote: > > > Klaus, > > > As Dan pointed out, his Field plugin i

[jQuery] selectbox: change selected item

2007-07-17 Thread zenx
Hi, I don't know how to change the selected item in a selectbox. I tried this but it doesn't work as expected. HTML code: = - First Second javascript code: var cliente = 2; $('#id_cliente:nth-child(cliente)').attr('selected','selected'); any ideas? T