For multiple updates with one ajax call, you might want to try sending back
a JSON response.

For example, in PHP you could do this:

<?php

$response = array(
    'test1' => 'Username',
    'test2' => 'Thank you for subscribing'
);

echo json_encode($response);

?>

Then, in your JS file, your ajax call would look something like this
(untested):

$.getJSON('ajax.php', {// data //}, function(response)
{
    $.each(response, function(id, html)
    {
        $('#' + id).html(html);
    });
});

-Hector


On Wed, Nov 19, 2008 at 7:32 PM, wsjquery <[EMAIL PROTECTED]> wrote:

>
> hi Mike,
> Thanks very much for the reply.
> In my php file that processes the form, how would I tell where each
> results goes. Do I place each in a div with the same id as the
> targets?
>
> Example php file
> <div id='test1'>Username</div>
>
> <div id='test2'>Thank you for subscribing</div>
>
> Thanks again for you help. Great plugin!
>
>
>
>
> On Nov 19, 9:55 pm, Mike Alsup <[EMAIL PROTECTED]> wrote:
> > >  target:        '#test1 #test2',   // target element(s) to be updated
> >
> > Just change that to:  '#test1,#test2'
> >
> > The target option takes a normal jQuery selector string.
> >
> > Mike
>

Reply via email to