Thank you...
On Dec 5, 1:39 am, Wizzud <[EMAIL PROTECTED]> wrote:
> You could try...
>
> $(':input',this).each(function(){
> var me = $(this);
> if(!me.is(':checkbox, :radio') || this.checked){
> inputs.push(this.name + '=' + unescape(me.val()));
> }
> });
>
> On Dec 4, 8:44 a
You could try...
$(':input',this).each(function(){
var me = $(this);
if(!me.is(':checkbox, :radio') || this.checked){
inputs.push(this.name + '=' + unescape(me.val()));
}
});
On Dec 4, 8:44 am, e2e <[EMAIL PROTECTED]> wrote:
> Changing my function to this solved my problem:
>
On Dec 4, 1:20 am, Wizzud <[EMAIL PROTECTED]> wrote:
> That would be because your $(':input', this) selector is selecting
> *every* input field in your form and adding it to your inputs array.
> One solution is to put a test in your each() function to see if the
> field is a checkbox or radio, and
Changing my function to this solved my problem:
$("form#profile_form").submit(function() {
$("#users_profile h1").after('');
$("#users_profile .errors").remove()
var inputs = [];
$(':input', this).each(function() {
That would be because your $(':input', this) selector is selecting
*every* input field in your form and adding it to your inputs array.
One solution is to put a test in your each() function to see if the
field is a checkbox or radio, and if it is, only add it to your inputs
array if it's checked.
5 matches
Mail list logo