Problem in disabling Text Boxes

If I disable a text button, I'm not able to copy the value to the database field. What cud be the reason?

The value where the textbox is diabled is being displayed on the screen and all other text fields values(Which r not disabled), I can copy them to database fields

[282 byte] By [harinibiligiria] at [2007-11-27 10:30:46]
# 1

It should work, can you provide more details?

skp71a at 2007-7-28 18:05:01 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

If you disable a text box it would not be passed to the server.Why should you disable a text box?Why can not you make it as read only?Can you elaborate more on your requirement?

SecfGuya at 2007-7-28 18:05:01 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Actually the Text Box contains total of Bills and it has to be displayed to the customer. But it should not be editable for them. How do I make it as read only?

harinibiligiria at 2007-7-28 18:05:01 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

You could pass a hidden value with the total in your form to the server.

Why use a text box if the user does not get to edit it? Use out.print or javascript instead.

jposthuma at 2007-7-28 18:05:01 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

This will make you text box readonly

<input type="text" name="textName" value="" id="textId" readonly="readonly"/>

To change the readOnly state of the text box using javascript , you may use

document.getElementById('textId').readOnly=false;

or

document.getElementById('textId').readOnly=true;

when you are accessing through javascript the property name is readOnly. The "O" is caps.

R@njita at 2007-7-28 18:05:01 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...