Ich habe das Problem, daß die Formularauswertun gin Mozilla Firefox ordentlich läuft, in IE aber nicht. Dort wird der Wert des Select-Feldes "gruppe" nicht ausgelesen. In Firefox aber ja.
Ich benutze folgenden html-code:
Code:
<html>
<head>
<title>Auswertung</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href='style.css' rel=stylesheet type=text/css>
<SCRIPT src="test.js" type=text/javascript></SCRIPT>
<SCRIPT src="lib/prototype.js" type=text/javascript></SCRIPT>
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<h2>Auswertung</h2>
<div id="buttons" style="position:absolute; width:200px; height:115px; z-index:1; left: 10px; top: 33px">
Auswahlmöglichkeiten:
<input type='submit' onClick='aufruf_update("inhalt","ajax_inventur_gesamt.php");' name='Abschicken2' value='Inventur Gesamt'><br><input type='submit' onClick='aufruf_update_formular("inhalt","ajax_inventur_einzel.php","formular");' name='Abschicken2' value='Inventur pro Kunde'><br><br><form id='formular'>
<input type=text name=kdnummer size="4">Kdnr
</form>
<input type='submit' onClick='aufruf_update_formular("inhalt","ajax_inventur_gruppe.php","formular2");' name='Abschicken2' value='Inventur pro Gruppe'><br><br><form id='formular2'>
<select name=gruppe><option>Test1</option><option>test2</option></select>Gruppenname
</form>
</div>
<div id="inhalt" style="position:absolute; width:600px; height:600px; z-index:2; left: 300px; top: 33px">
Ergebnisse
</div>
</body>
</html>
Das Javaconstrukt sieht so aus:
Code:
//Mit formularabfrage und Typenabfrage
function aufruf_update_formular(div_id, datei_php, formname){
var inhalt = Form.serialize(formname);
var dateiuebergabe = datei_php +"?" + inhalt;
//alert(dateiuebergabe);
var myAjax = new Ajax.Updater(div_id, dateiuebergabe);
}
Das merkwürdige ist, das das Script im IE bei der Einzelkundenabfrage funktioniert. Es muß mit dem Selectfeld zusammenhängen.