[latex]Mae govannen![/latex]
Wie könnte ich sonst die Zeilen ausblenden? Ich will ja nicht jeder Zeile eine eigene ID zuweisen müssen.
Sinnvolle Verwendung des Markup hilft hier auch.
<form name="profil_anlegen" action="{$_SERVER['PHP_SELF']}" method="post" accept-charset="ISO-8859-1">
<table border="1">
<tbody>
<tr><th colspan="7">Daten zur Reiseplanung</th></tr>
<tr><th colspan="7">Zieladresse</th></tr>
<tr><th>Strasse</th><td colspan="6"><input name="adresse[0][strasse]" type="text" size="30" maxlength="30" /></td></tr>
<tr><th>Hausnummer (nur Zahlen)</th><td colspan="6"><input name="adresse[0][hausnummer]" type="text" size="4" maxlength="4" /></td></tr>
<tr><th>Postleitzahl (nur Zahlen)</th><td colspan="6"><input name="adresse[0][plz]" type="text" size="5" maxlength="5" /></td></tr>
<tr><th>Stadt</th><td colspan="6"><input name="adresse[0][stadt]" type="text" size="30" maxlength="30" /></td></tr>
<tr><th>Land</th><td colspan="6"><input name="adresse[0][land]" type="text" size="30" maxlength="30" /></td></tr>
</tbody>
<tbody id="zeilen_zwischenziel1" class="ausgeblendet">
<tr><th colspan="7">Zwischenziel 1</th></tr>
<tr><th>Strasse</th><td colspan="6"><input name="adresse[1][strasse]" type="text" size="30" maxlength="30" /></td></tr>
<tr><th>Hausnummer (nur Zahlen)</th><td colspan="6"><input name="adresse[1][hausnummer]" type="text" size="4" maxlength="4" /></td></tr>
<tr><th>Postleitzahl (nur Zahlen)</th><td colspan="6"><input name="adresse[1][plz]" type="text" size="5" maxlength="5" /></td></tr>
<tr><th>Stadt</th><td colspan="6"><input name="adresse[1][stadt]" type="text" size="30" maxlength="30" /></td></tr>
<tr><th>Land</th><td colspan="6"><input name="adresse[1][land]" type="text" size="30" maxlength="30" /></td></tr>
</tbody>
<tbody id="zeilen_zwischenziel2" class="ausgeblendet">
<tr name=""><th colspan="7">Zwischenziel 2</th></tr>
<tr><th>Strasse</th><td colspan="6"><input name="adresse[2][strasse]" type="text" size="30" maxlength="30" /></td></tr>
<tr><th>Hausnummer (nur Zahlen)</th><td colspan="6"><input name="adresse[2][hausnummer]" type="text" size="4" maxlength="4" /></td></tr>
<tr><th>Postleitzahl (nur Zahlen)</th><td colspan="6"><input name="adresse[2][plz]" type="text" size="5" maxlength="5" /></td></tr>
<tr><th>Stadt</th><td colspan="6"><input name="adresse[2][stadt]" type="text" size="30" maxlength="30" /></td></tr>
<tr><th>Land</th><td colspan="6"><input name="adresse[2][land]" type="text" size="30" maxlength="30" /></td></tr>
</tbody>
<tbody id="zeilen_zwischenziel3" class="ausgeblendet">
<tr><th colspan="7">Zwischenziel 3</th></tr>
<tr><th>Strasse</th><td colspan="6"><input name="adresse[3][strasse]" type="text" size="30" maxlength="30" /></td></tr>
<tr><th>Hausnummer (nur Zahlen)</th><td colspan="6"><input name="adresse[3][hausnummer]" type="text" size="4" maxlength="4" /></td></tr>
<tr><th>Postleitzahl (nur Zahlen)</th><td colspan="6"><input name="adresse[3][plz]" type="text" size="5" maxlength="5" /></td></tr>
<tr><th>Stadt</th><td colspan="6"><input name="adresse[3][stadt]" type="text" size="30" maxlength="30" /></td></tr>
<tr><th>Land</th><td colspan="6"><input name="adresse[3][land]" type="text" size="30" maxlength="30" /></td></tr>
</tbody>
<tbody>
<tr id="cbutton"><th colspan="7"><input type="button" onclick="show_zwischenziel_felder()" value="Zwischenziel hinzufügen" /></th></tr>
<tr>
<th>Abesenden</th><td colspan="6"><input name="submit" type="submit" value="Absenden" /></td></tr>
<tr>
<th>Felder Löschen</th><td colspan="6"><input type="reset" value=" Felder löschen" /></td></tr>
</tbody>
</table>
</form>
<script type="text/javascript">
var ix = 1;
function show_zwischenziel_felder() {
document.getElementById("zeilen_zwischenziel" + ix).className = "";
if (ix > 2) {
document.getElementById("cbutton").className = 'ausgeblendet';
}
ix++;
}
</script>
Stur lächeln und winken, Männer!
Kai
--
It all began when I went on a tour, hoping to find some furniture
Followed a sign saying "Beautiful Chest", led to a lady who showed me her best)
SelfHTML-Forum-Stylesheet
It all began when I went on a tour, hoping to find some furniture
Followed a sign saying "Beautiful Chest", led to a lady who showed me her best)
SelfHTML-Forum-Stylesheet