Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

disable a field

Status
Not open for further replies.

mlocurci

MIS
Oct 17, 2001
210
US
I have a text box on my page that is prefilled with the user name. How can i make the box so that it can not be edited.

-Michael
 
By placing READONLY in the tag

<input type=&quot;text&quot; name=&quot;&quot; value&quot;&quot; READONLY> Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
Gary, that only works in IE....

For netscape:
Code:
<input type=&quot;text&quot; name=&quot;showVal&quot; value=&quot;whatever&quot; READONLY onBlur=&quot;this.value=document.myForm.holder.value&quot;>

<input type=&quot;hidden&quot; name=&quot;holder&quot; value=&quot;whatever&quot;>
ALSO: You can have your form handler read the values from the hidden fields for readonly values....
-- Just trying to help... LOL [ponder]
 
Netscape, whats that then? :p Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top