document.form.submit() Methode wird nicht unterstützt
Hallo, habe ein Problem mit JavaScript:
möchte eine PHP Seite erstellen, in der ich Einträge speichern kann, arbeite damit mit einem <select> und der Methode OnChange().
Code:
<script language="JavaScript" type="text/JavaScript">
<!--
function wechsle(){
for (i = 0; i < document.formular.vom.length; ++i){
if (document.formular.vom.options[i].selected == true){
document.formular.wann.value = document.formular.vom.options[i].value;
document.formular.vom.options[i].selected;
}
}
document.formular.speichern.value = "false";
document.formular.submit();
}
//-->
</script>
und der Form-Tag:
<form name="formular" method="post" action="<?php echo$_SERVER['PHP_SELF']; ?>" enctype="multipart/form-data">
und das <select>
<select name="vom" onChange="wechsle()">
<option value="neu">Neue info</option>
<?php
$res = $db -> sql("select * from infos");
While($row = mysql_fetch_array($res))
{
if($vom == $row["nr"])
echo "<option value=\"".$row["nr"]."\" selected>".$row["date"]."</option>";
else
echo "<option value=\"".$row["nr"]."\">".$row["date"]."</option>";
}
?>
</select>
Hat irgendjemand eine Idee?????
thx im voraus
|