File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Greying a Textbox

 
Viralraj Upadhyay
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I grey a text box using javascript which has no text to prevent a user from entering any text?If yes how? I dont want to disable it. I want to grey it.
 
Purushoth Thambu
Ranch Hand
Posts: 425
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question has been asked before here. If you are using Firefox all you have to do is make the textbox "readonly", however IE doesn't gray as good as firefox. You have to use CSS to get the desired color. Below is style I applied. Couldn't spend more time to get the border color right.



To change the color on the fly you can create a named style and assign the class attribute of the textbox.

You have more than one way to create gray text box, but you need CSS.
[ March 01, 2007: Message edited by: Purushothaman Thambu ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic