Give this a try:

jQuery.ajax({
        type: 'POST',
        url: 'emaildocument.php',
        data: { user: "test", file: "horse.jpg" },
        cache: false,
        complete: function() {
              // unblock when remote call returns
              jQuery.unblockUI();
        }
});




On Oct 8, 9:15 am, Simon <he...@simonpearce.co.uk> wrote:
> 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

Reply via email to