[jQuery] Double Negative
[jQuery] Double Negative
<span style="font-family: verdana;">I am trying to find all of the required input and select boxes that have not chosen a value. Default is ""</span><br style="font-family: verdana;"><br style="font-family: verdana;">
<span style="font-family: verdana;">The first line fills the array with empty inputs and ALL selects</span><br style="font-family: verdana;"><span style="font-family: courier new,monospace; color: rgb(51, 51, 255);"> inputArrayEmpty = $("
tr.required input[@value=''],tr.required select");</span><br style="font-family: verdana;"><br style="font-family: verdana;"><span style="font-family: verdana;">The second line it trying to eliminate from the array all of the ones who don't have a "" value.
</span><br style="font-family: verdana;"><span style="font-family: courier new,monospace; color: rgb(51, 51, 255);"> inputArrayEmpty = inputArrayEmpty.not($("select option:selected:[@value='']").parent("select"));
</span><br style="font-family: courier new,monospace;"><br style="font-family: verdana;"><span style="font-family: verdana;">I have it exactly backwards. I am pulling out the ones with the "" value and leaving the ones with a valid value.
</span><br style="font-family: verdana;"><span style="font-family: verdana;">How do I do this backwards.</span><br style="font-family: verdana;"><br style="font-family: verdana;"><span style="font-family: verdana;">There doesnt seem to be:
</span><br style="font-family: verdana;"><span style="font-family: courier new,monospace; color: rgb(51, 51, 255);">[@value<font size="4"><span style="font-weight: bold;">!</span></font>='']</span><br style="font-family: verdana;">
<br style="font-family: verdana;"><span style="font-family: verdana;">Not sure how to combine two selectors. </span><br style="font-family: verdana;"><span style="font-family: verdana;">Im getting confused.</span><br style="font-family: verdana;">
<br style="font-family: verdana;"><span style="font-family: verdana;">Glen</span><br style="font-family: verdana;">