This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft 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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "readOnly Attribute " Watch "readOnly Attribute " New topic
Author

readOnly Attribute

Arya Devan
Greenhorn

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.

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

Arya.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9343
    
111

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: 3636
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
Sheriff

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
Greenhorn

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.
 
 
subject: readOnly Attribute
 
Similar Threads
Html basic question
Problem in validatation in text filed.
Disable text input based on actionform value
non-editable in textarea
css background color question