Question: I am creating a page in JSP where I have a dropdown list and once the user selects a value he has to click on the go button and then the value is sent to the Servlet.

```
            </select>
            <input type="submit" name="GO" value="Go"/>

```

How do I make it so that it does it on change? E.g. when the user selects John all his details are retrived from the DB and displayed. I want the system to do it without having to click the go button.

Answer: 
Simple JavaScript will do - 

```
<form action="myservlet.do" method="POST">
    <select name="myselect" id="myselect" onchange="this.form.submit()">
        <option value="1">One</option>
        <option value="2">Two</option>
        <option value="3">Three</option>
        <option value="4">Four</option>
    </select>
</form>

```

Here is a link for a good [javascript tutorial](https://developer.mozilla.org/en/javascript).
other than using `this.form.submit()` you also can submiting by id or name.
example i have form like this : `<form action="" name="PostName" id="PostID">`

1. By Name : `<select onchange="PostName.submit()">`
2. By Id : `<select onchange="PostID.submit()">`