I have an advanced search page with two buttons.  One button is a
standard submit button.  The other button is bound to JQuery.
Clicking that button submits the form in the background, putting the
search criteria in the HTTP session, and then performs some other AJAX
work.  It works correctly.

The problem is that if you click the standard submit button after
having used the button with the AJAX button, then the browser will
display the last response received from the previous AXAX submit
rather than the response for the current Submit.

For now I will change the JQuery code to refresh the page when it is
done to see if that circumvents the problem, but I'm curious how I
might change my code so that the submit button gets only its response
instead of the last response received by the previous AJAX submit.
Here is my code.

$(document).ready( function()
{
    $('#ajaxBtn').click( function()
    {
        $('#saveOnly').val( 'Y' );
        $('#searchForm').ajaxSubmit(
       {
            beforeSubmit: loading,
            target: '#output',
            async: true,
            success: downloadFiles,
            error: submitError
        });
        return false;
    });
}); "

Steve Mitchell
http://www.ByteworksInc.com

Reply via email to