<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Unbenannt</title>
<style>
#fieldset_01 {
display:block;
}
#fieldset_02 {
display:none;
}
</style>
<script>
<!--
function writeHiddeFields() {
var fields = new Array('fieldset_01','fieldset_02');
for (i=0; i<2; i++) {
fields[i] = new Array(2);
}
fields[0][0] = document.anmelden.fnm1.value;
fields[0][1] = document.anmelden.lnm1.value;
fields[0][2] = document.anmelden.tlt1.options[document.anmelden.tlt1.selectedIndex].value;
fields[0][3] = document.anmelden.strasse1.value;
fields[0][4] = document.anmelden.house1.value;
fields[0][5] = document.anmelden.wuensche1.value;
fields[1][0] = document.anmelden.fnm2.value;
fields[1][1] = document.anmelden.lnm2.value;
fields[1][2] = document.anmelden.tlt2.options[document.anmelden.tlt2.selectedIndex].value;
fields[1][3] = document.anmelden.strasse2.value;
fields[1][4] = document.anmelden.house2.value;
fields[1][5] = document.anmelden.wuensche2.value;
for(var f=0; f<6; f++) {
document.body.innerHTML ='<input value="'+fields[0][f]+'"><br>'+
document.body.innerHTML;
alert(fields[0].length);
if(document.getElementById('fieldset_02').style.display == "block") {
document.body.innerHTML ='<input value="'+fields[1][f]+'"><br>'+
document.body.innerHTML;
alert('fieldset_02 hat:' + fields[1].length + 'Felder');
}
}
var show = document.getElementById('fieldset_02').style.visibility;
alert(show);
}
//-->
</script>
</head>
<body>
<form name="anmelden" method="post" action="" onsubmit="return writeHiddeFields()">
<fieldset id="fieldset_01">
<input type="text" name="fnm1" value=""><br>
<input type="text" name="lnm1" value=""><br>
<select name="tlt1">
<option value=""> </option>
<option value="Herr">Herr</option>
<option value="Frau">Frau</option>
</select><br>
<input type="text" name="strasse1" value=""><br>
<input type="text" name="house1" value=""><br>
<input type="text" name="wuensche1" value=""><br>
<input type="submit">
</fieldset>
<br>
<fieldset id="fieldset_02">
<input type="text" name="fnm2" value=""><br>
<input type="text" name="lnm2" value=""><br>
<select name="tlt2">
<option value=""> </option>
<option value="2">Herr</option>
<option value="3">Frau</option>
</select><br>
<input type="text" name="strasse2" value=""><br>
<input type="text" name="house2" value=""><br>
<input type="text" name="wuensche2" value=""><br>
<input type="submit">
</fieldset>
</body>
</html>