How can I trigger an action when the user changes the option in a pull-down list?

Troy Niven

Below is a simple example to show you how this can be done. You can of course use the function to do anything that JavaScript is capable of doing.

<title>Some Title</title>
<script language="javascript">
function someAction()
  window.alert("Please Don't Change That :)");
//you can change the above to anything you want
return true;
<form name="form1">
<select onChange="someAction();" name="select1">
<option value="option1">1</option>
<option value="option2">2</option>
<option value="option3">3</option>