I m doing a database project using jsp and javascript and back-end using mysql.

In my GUI,there is a page where when i select a particular item in a textbox .the other textboxes should automatically load other values from the database using the value selected from the first textbox.how can i do this using javascript?

I tried using 

```
obj1=this.options[this.selectedIndex].myvalue

```

But this did not work.