Value von form ohne Namen auslesen?
pr0n
- javascript
<script type="text/javascript">
function Check() {
for (i = 0; i < document.testform.itemid.length; ++i)
alert(document.testform.itemid.options.value);
}
</script>
<form name="testform" action="item.php" method="post">
<select name="itemid" size="10" >
<option value="1">Bla</option>
<option value="2">Blup</option>
</select></form>
<img src="http://www.bla.de/jpg.jpg" onError="Check()">
Funktioniert!
Jetzt hab ich aber das Problem, dass auf der Seite
die form keinen Namen hat:
<form action="item.php" method="post">
<select name="itemid" size="10" >
<option value="1">Bla</option>
<option value="2">Blup</option>
</select></form>
for (i = 0; i < document.itemid.length; ++i)
alert(document.itemid.options[i].value);
geht dann wiederrum nicht. Lösungvorschläge?
Hallo,
geht dann wiederrum nicht. Lösungvorschläge?
... lese bitte nach, warum es besser ist Doppelpostings zu vermeiden und in deinem noch aktivem Thread zu bleiben.
Gruß plan_B