$('select').val('value') should work (it needs to be applied to the
<select>, not the <option>

- ricardo

On Sep 29, 6:55 pm, Pete <[EMAIL PROTECTED]> wrote:
> I have an element that I populate with an Ajax call and returns a list
> of items for a combo box. In some cases the page containing the
> element gets loaded with existing values and rendered and I'd like the
> textbox to contain an item that was selected before the element is
> rendered.
>
> Is there a way to set that value?  I have done some searching but
> haven't found a solution as yet.  I have looked at setting the
> "selected" attribute but haven't found an example that works.  I have
> also tried setting the selected value with .val(myValue); but, again,
> tried it and didn't get it to work.
>
> It should be simple.  But I can't seem to crack it.  Suggestions?
>
> Thanks,
>
> Pete

Reply via email to