[jQuery] Submitted form not picking up selected items
<html>
<body>
Hi folks,
I'm using the following code to pass form data onto the server for
processing....
<tt>$.fn.ajaxSubmit = function(e) {this.submit(function(){ var params =
{}; $(this) .find("input[@checked], input[@type='text'],
input[@type='hidden'], input[@type='password'], option[@selected],
textarea") .filter(":enabled") .each(function() { params[
this.name || this.id || this.parentNode.name || this.parentNode.id ] =
this.value; });$("div#indicate").show();
$.post(this.getAttribute("action"), params,
function(text){
$("div#indicate").hide();
$("div#editinfo").hide();
$("div#listinfo").html(text).fadeIn("slow");
$("#productinfo").ajaxSubmit();
}); return false;
});}
</tt>In addition to hidden and textarea elements, my form contains two
option/select items, properly "name"d. In IE, all the
form's data are properly posted. In Firefox, the selected option
items are not posted (the other elements are).
Is there an error in the above code? If not, where else should I
look for a solution. I am using jquery rev 249.
Thanks,
Bruce
</body>
</html>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/