[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] Re: selectbox: change selected item

2007-07-17 Thread Klaus Hartl
Mike Alsup wrote: Klaus, As Dan pointed out, his Field plugin is very adept at getting, setting and otherwise manipulating data for field elements and Dan is adding new capabilities regularly. The Form plugin is mostly geared at providing ajax capabilities for the submit process. It also pro

[jQuery] Re: selectbox: change selected item

2007-07-17 Thread Mike Alsup
Klaus, As Dan pointed out, his Field plugin is very adept at getting, setting and otherwise manipulating data for field elements and Dan is adding new capabilities regularly. The Form plugin is mostly geared at providing ajax capabilities for the submit process. It also provides methods for ge

[jQuery] Re: selectbox: change selected item

2007-07-17 Thread Dan G. Switzer, II
>> Using my Field plug-in (http://jquery.com/plugins/project/field) you >could >> do: >> >> $("#id_cliente").setValue("2"); >> >> The big benefit to using my Field plug-in is that you can change the form >> field from a select box to a checkbox or radio element and you would not >> have to refacto

[jQuery] Re: selectbox: change selected item

2007-07-17 Thread Klaus Hartl
Dan G. Switzer, II wrote: 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','select

[jQuery] Re: selectbox: change selected item

2007-07-17 Thread Dan G. Switzer, II
>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'); > >a

[jQuery] Re: selectbox: change selected item

2007-07-17 Thread Klaus Hartl
zenx wrote: 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');