Used this script many times to pass 1 or 2 values to a PHP file, works fantastic. Using it now to pass 7 values and only the first 2 get through.
$(document).ready(function(){
$("form#send_note").submit(function() {
var to_user = $('#to_user').attr('value');
var from_user = $('#from_user').attr('value');
var defaultpic_from = $('#defaultpic_from').attr('value');
var defaultpic_to = $('#defaultpic_to').attr('value');
var your_username = $('#your_username').attr('value');
var message_title = $('#message_title').attr('value');
var message_contents = $('#message_contents').attr('value');
$.ajax({
type: "POST",
url: "../inbox/send_note.php",
data: "to_user="+ to_user +"& from_user="+ from_user + "& defaultpic_from="+ defaultpic_from + "& defaultpic_to="+ defaultpic_to + "& your_username="+ your_username + "& message_title="+ message_title + "& message_contents=" + message_contents,
success: function(){
$('form#send_note').hide(function(){$('div.success2').fadeIn();});
}
});
return false;
});
});
I have double checked all of the names, all is in order it's just the values after from_user (defaultpic_from) and so on won't go through. I believe it's the way I have the "data:" listed. I am a complete newbie when it comes to javascript so any advice on the properway to get these through would be fantastic!