scriptwelt.org das JavaScript Archiv

Navigation
Startseite
Audio & Sound
Formulare
Cookies
Fenster & Frame
Grafik & Text
Navigation
Suche Scripts
Fun und Spiele
Buttons
Diverse
Tutorials

Kontakt
eine Mail an ScriptWelt.org
Webhosting
Tipps zur Providerwahl und zum Webspace

JavaScript in eine HTML Datei einbinden

Sind JavaScripts sicher?

Links zum Thema JavaSript

Impressum
impressum

Formulare JavaScript / Intelligentes Formular

Beispiel eines "intelligenten" Formulars. Ist mehr zur Demonstation gedacht, was man wie machen kann. Das Ergebniss ist nicht so berauschend, da es bessere Scripts gibt. Ist nur der vollständigkeits halber aufgefürt.
Autor: unbekannt
zur Demo

 


<table border="0" width="100%">
<form action="" method="post">
<tr>
<td align="right">
<input type="checkbox" name="a1" value="ON" checked>
</td>
<td> Auswahl 1</td>
</tr>
<tr>
<td align="right">
<input type="checkbox" name="a2" value="ON"
onpropertychange="
af21.setAttribute('disabled', !getAttribute('checked')),
af22.setAttribute('disabled', !getAttribute('checked')),
ua1.setAttribute('disabled', !getAttribute('checked')),
fYear.setAttribute('disabled', !getAttribute('checked')),
fMon.setAttribute('disabled', !getAttribute('checked')),
fDay.setAttribute('disabled', !getAttribute('checked')),
fHour.setAttribute('disabled', !getAttribute('checked')),
fMin.setAttribute('disabled', !getAttribute('checked')),
fSec.setAttribute('disabled', !getAttribute('checked'))">
</td>
<td> Auswahl 2</td>
</tr>
<tr>
<td></td>
<td>
<input type="checkbox" name="af21" value="ON" disabled>
Feature 2.1</td>
</tr>
<tr>
<td></td>
<td>
<input type="checkbox" name="af22" value="ON" disabled>
Feature 2.2</td>
</tr>
<tr>
<td></td>
<td> <fieldset>
<input type="radio" name="R1" value="create_date" checked>
erstellt oder
<input type="radio" name="R1" value="last_modified">
bearbeitet
<input type="radio" name="R2" value="< " checked>
vor oder
<input type="radio" name="R2" value="> ">
nach<br>
Jahr:
<input type="text" name="fYear" size="4" maxlength="4" value= "2002"disabled>
Monat:
<input type="text" name="fMon" size="2" maxlength="2" value= "02"disabled>
Tag:
<input type="text" name="fDay" size="2" maxlength="2" value= "26"disabled>
, HH:
<input type="text" name="fHour" size="2" maxlength="2" value= "15"disabled>
MM:
<input type="text" name="fMin" size="2" maxlength="2" value= "57"disabled>
SS:
<input type="text" name="fSec" size="2" maxlength="2" value= "00"disabled>
</fieldset> </td>
</tr>
<tr>
<td></td>
<td>
<input type="checkbox" name="ua1" value="ON" disabled>
Unterauswahl 1</td>
</tr>
<tr>
<td colspan=2>
<input name="weg" type="submit" value="weg damit!">
<input type="hidden" name="Pg_reused" value="1">
</td>
</form>
</table>