So I have converted the values of a "completed" HTML form, to a custom DATA object to be made available to various js.functions, which may or may not update the values of said DATA object parameters before the object MAY, or may NOT ultimately be passed (via ajax) to PHP for database manipulation before the form data is ultimately submitted (to paypal).
Of course I know how to submit a form, and to pass an object as POST data via AJAX, but I'm wondering how or if it might be possible to post my DATA object (again, to payapl) in lieu of having to stop along the way to update the input values of the form itself, just so I can submit it. Something like...
<script>
data = {};
data.type ='form';
data.method ='post';
data.action ='https://www.sandbox.paypal.com/cgi-bin/webscr';
data.foo = 'foo';
data.bar = 'bar';
jQuery('#btn').click(function(){ jQuery('#form').submit(); });
jQuery('#post_data').click(function(){ data.submit();/*duh....???*/ });
</script>
<form id='data' action='https://www.sandbox.paypal.com/cgi-bin/webscr' method='post'>
<input type='text' name='foo' value='foo' />
<input type='text' name='bar' value='bar' />
</form>
<input type='button' id='btn' value='Submit'>
<input type='button' id='post_data' value='Post Data'>
which of course does not work...;-(