balufreak
Aktives Mitglied
Thread Starter
- Dabei seit
- 12.10.2003
- Beiträge
- 1.563
- Reaktionspunkte
- 28
Hallo Leute!
Irgendwie will heute wiedermal gar nichts so wie ich will. Darum die frage an euch.
Ich habe folgende JavaScript funktion
Weiter unten im HTML-Code habe ich denn auch das Feld dazu
Warum funktioniert das Javascript nich? Die FF-Errorkonsole meldet immer: "document.getElementById("valSPS") has no properties.
wo steh ich aufm schlauch?
Irgendwie will heute wiedermal gar nichts so wie ich will. Darum die frage an euch.
Ich habe folgende JavaScript funktion
Code:
function disableFields() {
var fields = new Array("valSps");
for (f in fields) {
eval("document.getElementById('"+fields[f]+"').setAttribute(\"readonly\", \"readonly\");");
}
}
window.onload = disableFields();
Weiter unten im HTML-Code habe ich denn auch das Feld dazu
HTML:
<input type="text" value="PLC13" id="valSps" />
Warum funktioniert das Javascript nich? Die FF-Errorkonsole meldet immer: "document.getElementById("valSPS") has no properties.
wo steh ich aufm schlauch?