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: 
Just ask assistance of JavaScript.

```
<select onchange="this.form.submit()">
    ...
</select>

```

### See also:

* [HTML dog - JavaScript tutorial](http://www.htmldog.com/guides/htmlintermediate/javascript/)
To those in the answer above. It's definitely JavaScript. It's just inline.

BTW the jQuery equivalent if you want to apply to all selects:

```
$('form select').on('change', function(){
    $(this).closest('form').submit();
});

```