First, i think you should have a reference to "this" in your handler, so i
dont think you need to use "event.target".
So, my solution would be $("option:selected", this).val();

Untested.. Lemme know if that works.

-GTG


On 8/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> I have attached an event handler to a form field like this:
>
> $('#'+fieldID).bind("change", {fieldref: fieldID}, this.changeHandler)
>
> In my handler, I can get a reference to  the field by using
> 'event.target' and I can use jQuery functions by doing $
> (event.target)....
>
> In this example, my field is a select field. If I want to get the
> value of that select field, am I correct to assume that the best way
> to do this is:
>
> event.target.options[event.target.selectedIndex].value
>
> or is there a better way to do this with jQuery?
>
>

Reply via email to