$("select[name=yearFrom]") doesn't work $(":select[name=yearFrom]"); doesn't work $(":input [name=yearFrom]") doesn't work $("input[name=yearFrom]"); doesn't work
There is no :select element in the jQuery docs, only an :input element. There should be a way to select select elements... On Apr 18, 5:35 pm, victorg <vr.gerrit...@gmail.com> wrote: > > Is it impossible in jQuery to select an element as I do here (var > > yearFrom=$(":input[type=select][name=yearFrom]");)? > > > Marc > > Yes, i think you should do it like this instead $("select > [name=yearFrom]"); > > jQuery will look for an element which actually has a type="select" > attribute. > > <button name="load">Load data</button> > $(":input[type=button]") - no result > > <input type="button" name="load" value="Load data" /> > $(":input[type=button]") - 1 result