It's not a secret anymore!*
The moose likes HTML, CSS and JavaScript and the fly likes How to set the background colour of the read only Testfeild 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 "How to set the background colour of the read only Testfeild" Watch "How to set the background colour of the read only Testfeild" New topic
Author

How to set the background colour of the read only Testfeild

Gurerum singh
Greenhorn

Joined: Oct 06, 2008
Posts: 2
Hi... Can somebody please let me know How tot make a READ only feild which has has it's bakground colour(suppose red) and onchange of it's value it's colour should also be changed to default colour)
Matteo Di Furia
Ranch Hand

Joined: Jun 20, 2008
Posts: 102
Seems a matter of CSS + Javascript. Try something like :

Gurerum singh
Greenhorn

Joined: Oct 06, 2008
Posts: 2
Thanks a lot for it, but suppose i have 5 feilds feild1, feild2,feild3,feild4,feild5 and after the change in the value of feild1 and feild2 the value are calculated and they are reflected automaticaly in feild3, feild4 and feild5 that means feild3,4,5 are dependent on feild1,2 and also feild3,4,5 are read only. i hope you are getting me Matteo

so in this case should i use the same thing which you suggested me
Himanshu Gupta
Ranch Hand

Joined: Aug 18, 2008
Posts: 598

in this case you do have to write some logic. Where have you decided to put your logic ? via Javascript or in some Bean?


My Blog SCJP 5 SCWCD 5
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60781
    
  65

Please take the time to choose the correct forum for your posts. This forum is for questions on JSP.

For more information, please read this.

This post has been moved to a more appropriate forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to set the background colour of the read only Testfeild
 
Similar Threads
reading digits from a double
problem with handling the states of the events
Memory game ArrayIndexOutofBoundsException 5
about parameter check
Javascript not detecting argument passed by JSP code