Hallo,
Ich lasse mir per xml/xsl eine html-Datei erzeugen, die folgendermaßen aussieht:
...
function attribute()
{
...
alert(document.SQL.SQL.value);
...
}
...
<form action=" " name="SQL" method="post">
<select name="SQL" size="1">
<option>SELECT </option>
<option>FROM </option>
<option>WHERE </option>
...
</select>
</form>Im IE allerdings funktionieren die Dropdown-Listen nicht (<select...>)
Die haben nämlich immer keinen Value, egal was man auswählt!
Woran kann das liegen?Du definierst ja auch keine value-Attribute. Probiere mal:
<form action=" " name="SQL" method="post">
<select name="SQL" size="1">
<option value="SELECT">SELECT </option>
<option value="FROM">FROM </option>
<option value="WHERE">WHERE </option>
...
</select>
</form>Der FireFox hält sich an die Standards, wo festgelegt ist: If this attribute is not set, the initial value is set to the contents of the OPTION element. Der IE tut das nicht. But, that's IE.
viele Grüße
Axel
Vielen Dank!
Jetzt funktionierts!
Das ich da nicht selber drauf gekommen bin!