// prepare the form when the DOM is ready 
$(document).ready(function() { 
						   
    var options = { 
        target:        '#message',
        success:       showResponse,  // post-submit callback 
 
        // other available options: 
        
		url: '../test-simpleXML.php',
        type: 'post'        // 'get' or 'post', override for form's 'method' attribute 
        //dataType:  null        // 'xml', 'script', or 'json' (expected server response type) 
        //clearForm: true        // clear all form fields after successful submit 
        //resetForm: true        // reset the form after successful submit 
 
        // $.ajax options can be used here too, for example: 
        //timeout:   3000 
    }; 
 
    // bind to the form's submit event 
    $('#nlplookup').submit(function() { 
        // inside event callbacks 'this' is the DOM element so we first 
        // wrap it in a jQuery object and then invoke ajaxSubmit 
		$('#message').html('<span>Looking Now...</span><img src="SCRIPTS/ajax-loader.gif" alt="ajax" />');
        $(this).ajaxSubmit(options); 
		
        // !!! Important !!! 
        // always return false to prevent standard browser submit and page navigation 
        return false; 
    }); 
}); 
 
// post-submit callback 
function showResponse(responseText, statusText)  { 

   $('#message').fadeIn(2000).append();
} 