I am using the code below to check a condition in a php. Is there a way, based on the response to: 1-either change the target 2-or make it return true?
I am doing some complex form validation that can only be done in the php, then display the callback errors in a div. Problem is if the php does not detect any errors and submit goes thru, the resulting page is also displaying in the same div. So I need to get rid of target $(document).ready(function() { var options = {target: '#error'} $('#form').submit(function() { $(this).ajaxSubmit(options); return false; }); });