Sumbit multiple checkboxes via ajax to php script using jQuery

Sumbit multiple checkboxes via ajax to php script using jQuery

Hi,
I am working on improvements for a web app.
It currently submits checkboxes to a php script for processing by
simply submitting the form naturally. However i require this action
using a ajax post to save bandwidth etc. and im struggling to work out
how to do this.
Im familiar with normal ajax posts using jquery but here i need to
post an array.
Simplified a little this is what i have.
<input type="checkbox" name="ckdOrd[]" value="1" id="order_1" />
<input type="checkbox" name="ckdOrd[]" value="2" id="order_2" />
<input type="checkbox" name="ckdOrd[]" value="3" id="order_3" />
<input type="checkbox" name="ckdOrd[]" value="4" id="order_4" />
It used to build an array ckdOrd[] and post to a php script with a
loop for processing. It needs to post the order numbers as an array
for processing.
Is there a way to simply create the same post using ajax jQuery?
I would prefer this as that would mean i dont have to make major
changes to the php script.
the php simply does something like this
//get posted array
$ckdOrd=$_REQUEST['ckdOrd'];
foreach
$ckdOrd as $key => $ord_no
{
//update mysql here
}
I have seen other posts but they all seem to be cluttered and
unhelpful.
Is it correct to avoid the name attribute and simple find each checked
checkbox using jquery? or am i going down the wrong path.
From - Sat Jan 9 13:50:25 2010
Message from discussion Superfish License
View parsed - Show only message text
X-BeenThere: jquery-en@googlegroups.com
Received: by 10.91.187.17 with SMTP id o17ls423318agp.2.p; Sun, 10 Jan 2010
    14:19:03 -0800
PST
Received: by 10.90.9.33 with SMTP id 33mr32799627agi.14.1263161943358;
Sun, 10 Jan 2010 14:19:03 -0800
PST
Received: by 10.90.9.33 with SMTP id 33mr32799626agi.14.1263161943304;
Sun, 10 Jan 2010 14:19:03 -0800
PST
Return-Path: <decola...@googlemail.com>
Received: from mail-yw0-f140.google.com
mail-yw0-f140.google.com [209.85.211.140]
by gmr-mx.google.com with ESMTP id 12si2589228gxk.10.2010.01.10.14.19.03;
Sun, 10 Jan 2010 14:19:03 -0800
PST
Received-SPF: pass
google.com: domain of decola...@googlemail.com designates 209.85.211.140 as permitted sender
client-ip=209.85.211.140;
Authentication-Results: gmr-mx.google.com; spf=pass
google.com: domain of decola...@googlemail.com designates 209.85.211.140 as permitted sender
smtp.mail=decola...@googlemail.com
Received: by mail-yw0-f140.google.com with SMTP id 4so58086015ywh.11
for <jquery-en@googlegroups.com>; Sun, 10 Jan 2010 14:19:03 -0800
PST
MIME-Version: 1.0
Received: by 10.101.165.2 with SMTP id s2mr3946500ano.55.1263161943265; Sun,
    10 Jan 2010 14:19:03 -0800
PST
Date: Sun, 10 Jan 2010 14:19:03 -0800
PST
In-Reply-To: <369a42e1-b143-47a8-94a0-26ac6ce008e1@m25g2000yqc.googlegroups.com>
X-IP: 188.193.222.216
References: <369a42e1-b143-47a8-94a0-26ac6ce008e1@m25g2000yqc.googlegroups.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0
Windows; U; Windows NT 6.0; de; rv:1.9.1.6

    Gecko/20091201 Firefox/3.5.6
.NET CLR 3.5.30729
,gzip
gfe
,gzip
gfe
Message-ID: <11782b41-8db9-41e9-9187-86c23a2028a3@a32g2000yqm.googlegroups.com>
Subject: Re: Superfish License
From: decola <decola...@googlemail.com>
To: "jQuery
English
" <jquery-en@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
if you look into the code of superfish you would see this
/*
* Superfish v1.4.8 - jQuery menu widget
* Copyright
c
2008 Joel Birch
*
* Dual licensed under the MIT and GPL licenses:
*     http://www.opensource.org/licenses/mit-license.php
*     http://www.gnu.org/licenses/gpl.html
*
* CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.t=
xt
*/
so its okay if you use it commercially :
but before you get the wrong idea i am not the developer and i really
do not know where he / she went and i think he / she would be very
happy about a donation :