var do_submit = false;
$(document).ready(function() { 
    var options = { 
       // target:'#inner_content',   // target element(s) to be updated with server response 
			beforeSubmit: showRequest,
			success:       showResponse  // post-submit callback 
				
    }; 
    $('#commentForm').ajaxForm(options); 
});


//post submit action
function showResponse(responseText, statusText)  { 
    // for normal html responses, the first argument to the success callback 
    // is the XMLHttpRequest object's responseText property 
 
    // if the ajaxForm method was passed an Options Object with the dataType 
    // property set to 'xml' then the first argument to the success callback 
    // is the XMLHttpRequest object's responseXML property 
 
    // if the ajaxForm method was passed an Options Object with the dataType 
    // property set to 'json' then the first argument to the success callback 
    // is the json data object returned by the server 
		$('#form_holder').html(responseText);			
}//showResponse



// pre-submit callback 
function showRequest(formData, jqForm, options) { 

		if(do_submit)
		{
    return true; 
		}

		return false;
}//showRequest
