How to pass parameters in jquery
Posted
by Priyanka
on Stack Overflow
See other posts from Stack Overflow
or by Priyanka
Published on 2010-04-06T10:48:13Z
Indexed on
2010/04/06
10:53 UTC
Read the original article
Hit count: 402
jquery-ajax
|php5
Hello. I am supposed to submit 2values called str and name to another page.But only 1value is getting returned in the next page.When i include name and on next page if i say print_r($_POST),then even the first value is not getting printed. I have written a fuction as follows,which works because there is only one parameter. function sendValue(str) { $.post( "newsletter/subscribe.php", //Ajax file { sendValue: str }, function(data){ $('#display').html(data.returnValue); }, "json" ); } But if i pass 2values in that function and in $.post,i do sendValue:str,name then i am not getting even 1value. Please help me.
© Stack Overflow or respective owner