Código PHP:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<script language="Javascript" type="text/javascript">
function validate() {
document.getElementById('buybox_form').submit();
}
</script>
</head>
<body>
<form action="/cgi-bin/cart.cgi" method="post" name="buybox_form">
<select name="colors">
<option value="blue">blue</option>
<option value="black">black</option>
<option value="white">white</option>
</select>
<input name="submit" type="button" onClick="validate()" value="submit">
</form>
</body>
</html>
Código PHP:
<script language="Javascript" type="text/javascript">
function validate() {
document.buybox_form.submit();
}
</script>
Código PHP:
<script language="Javascript" type="text/javascript">
function validate() {
document.forms.buybox_form.submit();
}
</script>