Hello, I have a problem when sending data with jQuery, if sent by clicking "Submit" if it works, but when trying to send it directly when the input 'name' has two values, does not run with ajax, but it does as a normal consultation.
Here you put the code on the form and the ajax, ajax is not much of, and the script I did to my paritr some light on the web page and jQuery, if I can say is wrong or could do html code: <form method="post" action="<?=base_url()?>add/APTV" id="fo3" name="fo3" > <div class="contentA"> <div class="row"> <div class="left">First name</div> <div class="right"><input name="prod" class="text" type="text" onkeyup ="if(this.value.length==2) submit()"><input type="text" name="cta" id="cta" class="input-text"> <br></div> <div class="clear"></div> </div> <input type="hidden" name="op_key" value="1" /> <input type="submit" name="mysubmit" class="green"/> --------- js code: $(document).ready(function() { $().ajaxStart(function() { $('#loading').show(); $('#result').hide(); }).ajaxStop(function() { $('#loading').hide(); $('#result').fadeIn('slow'); }); $('#form, #fat, #fo3').submit(function() { $.ajax({ type: 'POST', url: $(this).attr('action'), data: $(this).serialize(), success: function(data) { $('#result').html(data); } }) return false; }); Thanks