Why in this code after click on button get error: http://jsfiddle.net/FyUgH/
{"error": "Shell form does not validate{'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')
})
});
Remove additional
})
It should look like
$('#cli').live('click',function(e){
e.preventDefault();
alert('oo')
if($('input[type="text"]').val()=='')alert('input is empty')
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With