To use an ajax request, to send a number to the server and return information about that number! In case I return two values, they are nome & funcao
.
So long so good! It works as it should! It sends the information and returns its values!
In this same page I use a append
to add a new set of input's, they have the same classes, being matricula / nome / funcao
.
That's when my problem comes up! When entering the number in the first input of class matricula
, it returns the values, however when using append
and inserting another number in the next input of class matricula
, it does not return the information it should return, it simply reuses the result of the matricula
previous and reinsert in the input's nome & funcao
.
I'm 90% sure that this problem is being caused by jquery, because I do not handle much, and I'm jamming things! So could you help me?
In summary I would like the code to do the following
That for every% of_%, auto fill in its respective input's, that is,
input class="matricula"
&input class="funcao"
.It is worth remembering that in the code I make every
input class="nome"
, the input's are inserted inside aappend
.
The working example is here: link
The codes are here :: link