Currently, I am working with jQuery version 2.1.4 and JavaScript to implement a straightforward form validation using Bootstrap.
During this process, I have encountered three peculiar issues.
While I am confident that my jQuery code is properly functioning in the
onblur
andonfocus
events of the<input>
elements (as demonstrated in my fiddle), I am unable to observe the styling of the.has-error
class. I have includedboostrap.css
in the<head>
section, however.The
<form-group>
component is causing my paragraph to be excessively indented towards the far left of the screen, resulting in it being partially hidden. I might be misusing it, but the reason behind this behavior eludes me.The "Cancelar" button is not functioning correctly. Despite attempting both
and a plain URL approach similar to the one used in the fiddle, I am still encountering issues. Firefox is displaying an error stating that "cancelar is not defined." Is it permissible to define a standalone JavaScript function as I have done (by mixing JavaScript with jQuery), or is it necessary to bind it using<s:url value="/listaReservas.jsp" />
$('#xxxId').click(function(){});
???
Any assistance on these matters would be greatly appreciated. Thank you.