tjyoung
asked on
Appending a variable on a .post in jquery. Must be doing it wrong?
Hi,
I'm guessing I'm adding my account_id variable wrong in this post using jquery. I see the php is working fine (the variable appears). I'm just thinking I have a syntax error somewhere in the url:
Any idea where I'm incorrect?
This is what it looks like prior to posting it:
See anything?
Thanks tj
I'm guessing I'm adding my account_id variable wrong in this post using jquery. I see the php is working fine (the variable appears). I'm just thinking I have a syntax error somewhere in the url:
$.post("application/modules/account/scripts/start_social.php",{ account_id:"<?php echo $account_id;?>", campaignstartmessage:$("#campaignstartmessage").val(),twitter:$('#twitter:checked').val(),facebook:$('#facebook:checked').val() } ,function(data)
Any idea where I'm incorrect?
This is what it looks like prior to posting it:
$.post("application/modules/account/scripts/start_social.php",{ account_id:"4", campaignstartmessage:$("#campaignstartmessage").val(),twitter:$('#twitter:checked').val(),facebook:$('#facebook:checked').val() } ,function(data)
See anything?
Thanks tj
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Seems there is syntax error
$(document).ready(function (){
$.post("application/module s/account/ scripts/st art_social .php",
{ account_id:"<?=$account_id ;?>", campaignstartmessage:$("#c ampaignsta rtmessage" ).val(),tw itter:$('# twitter:ch ecked').va l(),facebo ok:$('#fac ebook:chec ked').val( ) } ,
function(data)
{
}
});
$(document).ready(function
$.post("application/module
{ account_id:"<?=$account_id
function(data)
{
}
});
ASKER
It was a typo on the receiving script. There goes 2 hours of my life I'll never get back. Thank you very much for your responses though. They are good references regardless.
ASKER