I am having problems with this form it has two submit options a button and an onchange instance the onchange just will not work can any one tell me why?
my doc type is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
the form is
<table class="mailbox">
<form id="form1" action="mymessages.php?" method="post">
<tr><td colspan="4" class="header"><?=$folder?></td></tr>
<tr><td colspan="2" class="header">Subject</td><td class="header">Date</td><td class="header">From</td></tr>
<?
if ($messagecount>0)
{
echo'<tr><td class='.$viewclass.'><input type="checkbox" name="selected" value="'.$mid.'" /><td class='.$viewclass.'><a href="mymessages.php?&mid='.$mid.'">'.$subject.'</a></td><td class='.$viewclass.'>'.$daterec.'</td><td class='.$viewclass.'>'.$fromuser.'</td></tr>';
}
if ($messagecount<0)
{
echo '<tr><td colspan="4">You have no messages in your '.$folder.'</td></tr>';
}
?>
<tr><td class="header"><input type="submit" name="submit" value="Delete" /></td><td colspan="3" class="header">Move To:
<select name="test" onchange="submit()">
<option value="" selected="selected">Folder</option>
<?
while($row=mysql_fetch_array($resultfolder))
{
$folders = ucwords($row["folder"]);
if ($folders==$folder)
{
$folders == " ";
}
echo '<option value="'.$folders.'">'.$folders.'</option>';
}
?>
</select>
</form>
</td></tr>
</table>