[eluser]Carlos Mora[/eluser]
Hi ignitors,
I've been learning about using AJAX with forms, using FormTorch as a base.
This works fine, except for a minimal problem, that follows:
There is spans between label and inputs to show eventual errors like
Code:
<span class="error" id="nombre_error">
</span>
The js routine that submits data updates a <span> label with errors, making
Code:
$("#nombre_error").html(data.nombre);
That makes the error message appears, but ads the error message surrounded by a <p> as in:
Code:
<span class="error" id="nombre_error">
<p>El campo nombre es necesario.</p>
</span>
where the extra <p> came from? that changes the presentation, <p> is a block tag.