On Dec 22, 9:57 pm, kstubs <kst...@gmail.com> wrote: > I have a select option, in HTML It is empty like this: > > <select id="myselect" name="selector"><option/></select> > > After page load I make ajax request and finish loading the selector with > additional option(s). > > So I might have: > <select id="myselect" name="selector"> > <option>1</option> > <option>2</option> > <option>3</option> > </select> > > I have registered an event to handle a submit click for the form and pass > the value to the click handler event like this: > > $('paging').down('input.previous').observe('click', > _msoS.handlePagingSubmit.bindAsEventListener(_msoS, $F('myselect'))); > > The value passed to my click handler for myselect is NULL but indeed the > first option is selected. > You haven't said how the first option is selected (whether by the user, or by the initial Ajax load); but I think the problem might be that with some browsers if you populate a <select> by Javascript it is not enough to have one or more of the <option>s 'selected': you need to tell the <select> explicitly what is selected.
-- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.