gee, that kinda like serialize, in jQuery core.
serialize()

Serializes a set of input elements into a string of data. This will
serialize all given elements.

A serialization similar to the form submit of a browser is provided by the
form plugin. It also takes multiple-selects into account, while this method
recognizes only a single option.
Returns

String



On 5/7/07, Tamm Sjödin <[EMAIL PROTECTED]> wrote:

I found a solution on my own... why didn't I try this before?

data='{u:"'+$('#loginname').val()+'",p:"'+$('#loginpassword').val()+'",r:"'+$('#loginremember').val()+'"}';
becomes

data='u="'+$('#loginname').val()+'"&p="'+$('#loginpassword').val()+'"&r="'+$('#loginremember').val()+'"';

I'd love some comments on this as a solution, it seems to work but... is
it like legit? (it does work now though)

Cheers,
Tamm Sjödin



On 7 May 2007, at 00:30, Tamm wrote:


Hi I'm feeling very stupid asking this but here goes:

I'm sending something like this
$.post("/scripts/login.php",{u:"USER",p:"PASS",r:"STAY"},function(txt)
{$("div#"+div).html(txt);});

but the php $_POST[''] array get's no data...

now please tell me how stupid I am :)





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ

Reply via email to