$(this).val() should work just fine. There must be some other issue. Are you sure the HTML is correct (eg. options all have values)?
On Sat, Jan 9, 2010 at 5:55 PM, -null- <suzanne.bo...@gmail.com> wrote: > I'm adding an input and select box to a div by setting the div's > html. I then attach a change event to the select which posts to a php > page using ajax. I'm having a problem however accessing the value of > the input from the change event. This is the event. > > $('#' + popup.popupId + ' select').change(function(event) { > event.preventDefault(); > > popup.showLoading(); > > var matchup = $('#' + popup.popupId + ' input[type="hidden"]').val(); > var match = $(this).val(); > > $.get(baseUrl + 'edit_match&type=match&matchup_id=' + matchup + > '&match_id=' + match, {}, function(data, textStatus) { > handleFormSuccess(popup, data); > }, 'json'); > }); > > Is there a way I can access the value of the input here. I've tried > various selectors but none seem to work. >