T
thilo
hi ng!
i need to change the (inline) style-setting - ie the "style="
attribute - for an html-<input> by client-side script, according to
the "value" of another <input>.
i declared it like that in the html-body:
<input name="enter"><br>
....
<input name="targetField" style="background-color:#ffffff" value="Some
Text" disabled>
so i tried sth like that in the enter-field's event-handler:
If enter.value < 0 Then
targetField.style = "background-color:#ff0000"
Elseif enter.value = 0 Then
targetField.style = "background-color:#ffffff"
Else
targetField.style = "background-color:#0000ff"
End If
but this will not work.
ok, ok, thats vb-script - not javascript, but the idea is the same and
it's about handling html-objects, which have the same attribs and
props no matter what language. so, please...
has anyone an idea how to change the style?
i'm totally at sea right now and thankful for any hint or help!
cheers
thilo
i need to change the (inline) style-setting - ie the "style="
attribute - for an html-<input> by client-side script, according to
the "value" of another <input>.
i declared it like that in the html-body:
<input name="enter"><br>
....
<input name="targetField" style="background-color:#ffffff" value="Some
Text" disabled>
so i tried sth like that in the enter-field's event-handler:
If enter.value < 0 Then
targetField.style = "background-color:#ff0000"
Elseif enter.value = 0 Then
targetField.style = "background-color:#ffffff"
Else
targetField.style = "background-color:#0000ff"
End If
but this will not work.
ok, ok, thats vb-script - not javascript, but the idea is the same and
it's about handling html-objects, which have the same attribs and
props no matter what language. so, please...
has anyone an idea how to change the style?
i'm totally at sea right now and thankful for any hint or help!
cheers
thilo