PDA

View Full Version : How to dynamically replace/fill an html element with custom message



naspar
29 Jun 2011, 4:16 AM
Hello,

does anybody know how to dynamically change the element content using core function ?

I am building a validation form which allow users to join into a web portal application. The html page contains several input boxes which are checked once the user does form-submit .

My target is to show a custom error for each error in the same <td></td> or <label> html element. (wrong input,mandadotry field, custom error alert).

I tried using different ext-core functions (replaceWith, insertfirst, replace) but none of those can fill/empty or replace an existent content .

Please help me

thanks

M.

naspar
30 Jun 2011, 12:56 AM
my question was not probably clear .

i would like to have just one point where to display messages for the user who try to fill all fields.
something like this :

<table>
<tr>
<td>
<a>WARNING : Wrong email !</a>
</td>
</tr>
</table>

or

<table>
<tr>
<td>
<a>WARNING : surname is mandatory !</a>
</td>
</tr>
</table>

am trying to figure out how to fill/replace/change the tag <a></a> content with some ajax function once user try to fill fields before submitting the form ..

hope someone will make me able to reach my target ..

thanks again