Why in this code after clicking the button an error appears: http://jsfiddle.net/FyUgH/
{"error": "The shell form does not check {'html_initial_name': u'initial-js_lib ',' form ':,' html_name ':' js_lib ',' label ': u'Js lib', 'field' :, 'help_text': '', 'name': 'js_lib'} "}
<form action="#" method="POST"> <input type="text" name="name"> <button id="cli">Submit</button> </form> $('#cli').live('click',function(e){ e.preventDefault(); alert('oo') if($('input[type="text"]').val()=='')alert('input is empty') }) });
source share