[jQuery] Passing variables to jQuery?
Hi,
I'm using this code:
jQuery('#sendemail').click(function() {
// update the block message
jQuery.blockUI({ message: "<h1>Remote call in progress...</
h1>" });
jQuery.ajax({
type: 'POST',
url: 'emaildocument.php',
data: 'user=test&file=horse.jpg',
cache: false,
complete: function() {
// unblock when remote call returns
jQuery.unblockUI();
}
});
});
But can't understand how I can pass the data variables 'user' and
'file' from within my PHP page to the jQuery post.
Any ideas?
Cheers
Simon