I have a form in PHP which generates the HTML below:
If I select a code from the drop down list and then click 'Display time and Fees Information' it works fine. I want it to autorun if someone selects the drop down list. So I added onchange=submit() - why doesn't this work?
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Time and Fees Data</title>
<!--
Generates a dynamic drop down list of all
client codes in Time & Fees.
When a client is selected the page refreshes
and loads the client details from Time & Fees
-->
<style type="text/css">
<!--
body {font-family:verdana; font-size:11px; font-style:normal; font-weight:normal;}
th {color:white; background-color:gray; font-size:11px;}
td {background-color: silver; font-size:11px;}
-->
</style>
</head>
<body>
<form method="post" action="/php/feesodbc.php">
<select name="custname" onchange="submit()">
<option>ABB01</option>
<option>ABB02</option>
<option>ZZZCHA05</option>
</select>
<input type="submit" name="submit" value="Display Time and Fees Information">
</form>
</table>
</body>
</html>
If I select a code from the drop down list and then click 'Display time and Fees Information' it works fine. I want it to autorun if someone selects the drop down list. So I added onchange=submit() - why doesn't this work?