Best to all,

I'm new around here, and also with jquery php programming. I appreciate the cooperation you can get.

Well, my problem is with the use of basic plugin for Jquery Autocoplete, I have not used any of the many that circulate on the Internet.
I managed to do well the search and query the database, it returns me the names of the students, the problem comes when I assign the id of the selected name to a hidden field of the form to send via the id _get to another page editor.

To achieve this autocomplete (or autosuggest), I created 3 files. 2 to make the query and process, and the next file that contains the form and the Javascript code that should work.

busq-alumnos.inc.php:

<script type="text/javascript" src="js/jquery-1.4.2.min.js"> </ script>
<script type="text/javascript" src="js/jquery-ui-1.8.6.custom.min.js"> </ script>
<script type="text/javascript" src="js/jquery.curvycorners.min.js"> </ script>
<script type="text/javascript">
$ (function () {
$ ('# buscar'). Autocomplete ({
source: 'ajax.php', / / php file that processes the search
minLength: 2,

select: function (event, ui) { / / Here's my biggest problem -
$ ('# id'). Val (ui.item.id)
}
});
});


</ Script>

</ Head>

<body>

<div id="busqueda">
<form action="edit_alumno.php?id=" method="get">
<p> Student: </ b> <input type="text" name="buscar" id="buscar" class="cuadro-2" /> </ p>
<input type="submit" name="submit" value="enviar" />
<input type="text" size="5" name="id" id="id" class="cuadro-2" value="" />

/ / -------- This field is not assigned it by javascript ----

</ form>
</ div> <! - # Search ->

<div id="resultados">

</ div> <! - # Results -> / / Here ends the part of the problem conicerne


Anyway, the point is that everything works fine except the assignment of the hidden field id on the form.
I've looked several times the official documentation and in many forums, and I can not figure out what goes wrong.

Sure I have not explained very well, I hope you understand me ....

Thanks and greetings!

Luis Cardenas