- this.find("input[@type='submit'],input[@type='hidden'],textarea,input[@checked],input[@type='password'],input[@type='text'],option[@selected]").filter(":enabled").each(function() {
+ this.find("input,textarea,option")
+ .filter(":enabled")
+ .each(function() {
+ //
+ // Skip selects with options which aren't selected
+ if (((this.parentNode.type == 'select-one') || (this.parentNode.type == 'select-multiple')) &&
+ (!this.selected))
+ return;
+
+ //
+ // Skip radio and checkbox elements which aren't checked
+ if (((this.type == 'radio') || (this.type == 'checkbox')) &&
+ (!this.checked))
+ return;
+
+ //
+ // All other elements are valid ;)