Click to See Complete Forum and Search --> : Grey Out Form Element(s) w/ HTML?


sanjuT
02-05-2003, 09:51 AM
this may be a dumb question, but is it possible to grey out form elements, like a textbox, with just HTML?

If not, will HTML and JavaScript do it?

Thanks!

Zach Elfers
02-05-2003, 10:27 AM
What do you mean to "grey them out". This might be what you are looking for but I am not sure.

<input type="text" name="field1" style="background:gray;" onFocus="this.style.background='white';" onBlur="this.style.background='gray';">

Robert Wellock
02-05-2003, 11:03 AM
Colour the thing grey or disable user-input is the question, we are asking...

sanjuT
02-05-2003, 01:17 PM
thanks, but thqat was not what i was looking for...i meant grey out the elements so the user cannot enter any info in it..

i am also using netscape 4.76

Zach Elfers
02-05-2003, 01:27 PM
<input type="text" name="textField" disable="disabled" onFocus="this.blur();">