Hello guys!
Actually I have this
html interface;
<input type="text" size="20" name="
brandname" />
<input type="hidden" name="brandid" value="" />
And this is my
jquery;
$('#brandname').autocomplete("searchbrandnames.jsp", {
minChars: 3
});
OK... the ideas here is that;
Once the user type something into that textfield,
the jquery will work to have a somekind of
autocomplete... like what google does for example.
But here, if we notice from the interface above,
There is a
hidden value there,
Green colored.
That hidden value is going to be used
as a hidden variable stored.
That one, that made me question this thread.
What is the best way to obtain
autocomplete into the textfield and also by
getting the id into the hidden value as well?
In above example; let's assume,
1) we are typing a brand name into the textfield,
2) then jquery request into the db for some similar brand names,
3) it returned their names with their id; respectively 1 to the textfield and another 1 into the hidden value.
But, as far as I'm working with jquery right now,
many plugins available there...
just returned values into a single place nor many values into many places. I'm saying places means, referring to the html elements.
Hmmm.... is there any turn out for this case?