Okay, so I'm trying to find out if it's possible to post serialize() and other data that's outside the form.
Here's what I though would work, but it only sends 'wordlist' and not the form data.
$.post("page.php",( $('#myForm').serialize(), { 'wordlist': wordlist }));
Anyone have any ideas?
Try $.param
I like to keep objects as objects and not do any crazy type-shifting. Here's my way
if you can't see from above I used the .concat function and passed in an object with the post variable as 'name' and the value as 'value'!
Hope this helps.
You could have the form contain the additional data as hidden fields which you would set right before sending the AJAX request to the corresponding values.
Another possibility consists into using this little gem to serialize your form into a javascript object (instead of string) and add the missing data: