yeah, the other method of passing data via ajax is:
...
url: "myurl.php",
type: "post",
data: {"variablename":"value", "variablename2":someJSValue},
...

you could declare an object that contains your arguments that you want to
pass in to updatesql.php like this:

var args = {}
args.name = "John"
args.location = "Brisbane"
args.SomeOtherVariable = someJSVariable

then you could do:
...
url: "myurl.php",
type: "post",
data: args,
...

where args is the object that you just created.

Hope this helps! :o)

Chris


On Fri, Apr 11, 2008 at 2:36 PM, Scott Sauyet <[EMAIL PROTECTED]> wrote:

>
> Chris Jones wrote:
>
> > <script>
> > $(document).ready(function(){
> >    $("#list").sortable({
> >        accept: 'item',
> >        update: function(sorted) {
> >            serial = $('#list').sortable('serialize');
> >            $.ajax({
> >                url:"updatesql.php",
> >                type:"POST",
> >                data: serial.hash,
> >                error:function(){alert('Failed');},
> >                success:function(){alert('Success');}
> >            });
> >        }
> >    });
> > });
> > </script>
> >
>
> Have you tried doing an alert on serial.hash?
>
> I don't know that property.  The sortable('serialize') function returns a
> String that should be all set for being part of a URL, so you might just try
>
>                data: serial,
>
> Where is that hash property defined?
>
>  -- Scott
>



-- 
http://cjordan.us

Reply via email to