Click to See Complete Forum and Search --> : html input text box simple question, simple answer
jjanouse
10-02-2002, 11:15 AM
How do you keep the text in a text box from changing. I have the text in there and i don't want the user to be able to change the value of it. How do i do this, i know it is easy, but my brain isn't working today. Thanks.
Tekime
10-02-2002, 02:59 PM
I think this should work for you:
<input type="text" value="Don't change me!" disabled>
Grizzly
10-02-2002, 03:20 PM
I'm think that only works in IE. I know one way that always works in IE and Netscape is:
<input type="text" name="myName" value="Grizzly" size="45" onFocus="this.blur()">
Tekime
10-02-2002, 03:53 PM
Originally posted by Grizzly
I'm think that only works in IE. I know one way that always works in IE and Netscape is:
<input type="text" name="myName" value="Grizzly" size="45" onFocus="this.blur()">
I was afraid of that. I believe I only used the method one time in an actual prject, and when I think back it was for an intranet site that was only IE5. So you're more than likely right. I'll have to check out both methods later on, because I think this could come in useful in a PHP project I'm working on...