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
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
this is how I define my string
data='{u:"'+$('#loginname').val()+'",p:"'+$('#loginpassword').val()
+'",r:"'+$('#loginremember').val()+'"}';
I also tried this
data='{"u":"'+$('#loginname').val()+'","p":"'+$('#loginpassword').val
()+'","r":"'+$('#loginremember').val()+'"}';
with no change
I could be dead wrong here, but when I'm sending a hash like that to my
pages (they're CF pages, but I don't *think* that makes a difference) I
always put quotes around the name of the argument. Like this:
{"u":"User", "p":"Pass", "r":"Stay"}
I do not, however use quotes if the value I'm pas
but then I'd probably not get any answer at all. I do get an answer,
just not one filled with the data I try to send.
On 7 May 2007, at 23:55, Equand wrote:
maybe it doesn't like this
"/scripts/login.php"?
"./scripts/login.php" might help...
On May 7, 4:36 pm, Massimiliano Marini <[EMAIL
maybe it doesn't like this
"/scripts/login.php"?
"./scripts/login.php" might help...
On May 7, 4:36 pm, Massimiliano Marini <[EMAIL PROTECTED]> wrote:
> > I'm sending something like this
> > $.post("/scripts/login.php",{u:"USER",p:"PASS",r:"STAY"},function(txt)
> > {$("div#"+div).html(txt);});
>
that's exactly what my code does too, only mine replaces the previous
data. and I do get a response, it isn't that, I just get no transfer
to the $_POST array
there is no JS or php error reported by firebug or any other.
realtime example: http://l.ängel.se/admin/
what you type in the fiel
> I'm sending something like this
> $.post("/scripts/login.php",{u:"USER",p:"PASS",r:"STAY"},function(txt)
> {$("div#"+div).html(txt);});
$.post("/scripts/login.php",
{u:"USER",p:"PASS",r:"STAY"},function(data){
$("#response").append(data).show('fast');
});
create
gives me an empty array
On 7 May 2007, at 15:33, Massimiliano Marini wrote:
but the php $_POST[''] array get's no data...
Have you tried something like this?
var_dump $_POST[] // without ''
--
Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/
"It's easier to invent
> but the php $_POST[''] array get's no data...
Have you tried something like this?
var_dump $_POST[] // without ''
--
Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/
"It's easier to invent the future than to predict it." -- Alan Kay
Nope, doesn't fix it.
I did try to add the data to the end of the url as get and then it
does work...
I actually have the same issue when using $.get() too...
I just didn't think about that before because that's not what I need.
I have another script for POST that does work, but it feels st
maybe try $_REQUEST['']
???
On May 7, 12:30 am, Tamm <[EMAIL PROTECTED]> 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 $_POS
12 matches
Mail list logo