Andreas Schneider: Problem mit prüfen von Form-Feldern

Beitrag lesen

Hallo Julian,

also <select name="xy">
<option value="">Auswählen</option>
<option value="1">foo</option>
<option value="2">bar</option>
ist nie leer...

Wie kann man das prüfen?

if (document.formname.xy.options[document.formname.xy.selectedIndex].value == "")

Solche Sachen findest Du alle in selfhtml.

Grüße
Andreas

--
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
(Rich Cook)