This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes readOnly Attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "readOnly Attribute " Watch "readOnly Attribute " New topic

readOnly Attribute

Arya Devan

Joined: Feb 07, 2006
Posts: 28
Hi ,

Is there any way to check the read-only attribute of a text box ??

I have to disable a image link beside a text box whose read-only attribute is set to true.

[ September 23, 2006: Message edited by: Bear Bibeault ]

Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

Is there any way to check the read-only attribute of a text box

You can with javascript:

[My Blog] [JavaRanch Journal]
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3640
Aslo checkDisable All Links with JavaScript by Eric Pascarello.

This thread is belongs to HTML and JavaScript forum.

My blood is tested +ve for Java.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

If you know, before sending the response to the client, that you're going to set the readonly attribute then you can do this with server side code.
If it needs to change according to the user's input, without sending another post to the server, then this will need to be done on the client.

If you need to do this on the client side, let us know so we can move this thread to the HTML/Javascript forum.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Arya Devan

Joined: Feb 07, 2006
Posts: 28
hi all ., thanks for the reply and sorry for the delayed response.

yes it needs to be done in the client side, and sorry for having posted it in this section.

thanks for tat.
I agree. Here's the link:
subject: readOnly Attribute
It's not a secret anymore!