Have you tried the disabled or readonly attribute?
<input readonly maxLength=7 type = text size=7 name="DB2887_1">
<input disabled maxLength=7 type = text size=7 name="DB2887_1">
Corey
Main Topics
Browse All TopicsHi All,
i want to display all the values of the form which the user entered in the form.the following code can display the values but the user can change the values but i want such that the user can't change the values i am having a button in the form if he want to edit so now i want to display the values from the database the db# is the value that to be displayed from the database so that he can't get edited.
<tr>
<td>Prop.Type:</td>
<td><input maxLength=7 type = text size=7 name="DB2887_1"></td>
</tr>
Thanks
Sujan
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Sorry, my previous code didn's work
This time I used onFocus instead of onClick and improved the code a little
check this :-)
--------------------
<script language="JavaScript" type="text/javascript">
<!--
var editable = 0;
//-->
</script>
<input type="text" name="myButon1" id="field" onFocus="if (editable == 0) this.blur();">
<input type="text" name="myButon2" id="field" onFocus="if (editable == 0) this.blur();">
check to edit :
<input type="checkbox" onChange="editable = (this.checked)?(1):(0);">
-------------------------
Hihi
This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.
<note>
Unless it is clear to me that the question has been answered I will recommend delete. It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.
</note>
If the user does not know how to close the question, the options are here:
http://www.experts-exchang
Cd&
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: coreybryant {http:#8744823}
Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
mplungjan
EE Cleanup Volunteer
Business Accounts
Answer for Membership
by: sujan17Posted on 2003-06-17 at 14:34:45ID: 8744488
in one word it can be said that the text field is locked.