I have an input which has default value. In some cases default value would be nothing (I mean input would be empty) So the code will be something like this:
<input type="text" class="srlz" value="" />
then i have a jquery function which should serialize non empty inputs. (and the selects which their values are not -1) by this code:
$(":input.srlz[value!='']").not(":has(option[value='-1']:selected)").serialize();
or:
$(":input.srlz").not(":has(option[value='-1']:selected)").not("[value='']").serialize();
but the code does not serialize mentioned input although i enter value for the input, since it has default value ( value="" ).
I've just tested the following input instead of the first line and it works good.
<input type="text" class="srlz" />
how can i fix the problem?