Graying out of text in textbox

Posted by Arun.Padmanaban under ASP.NET on 7/12/2012 | Points: 10 | Views : 2740 | Status : [Member] | Replies : 4
Hi all,
I have textbox with text 'enter short name'.on page load i need to make the text color as 'Gray' .Below is the code i am using to gray out.It's working fine for IE8 & IE9.But it's not gray out for IE7
document.getElementById("tcHeader_tpGeneral_txtProductName").style.color = "grey";




Responses

Posted by: Hemanthlaxmi on: 7/17/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Arun,

Check this article for Greying the text in the textbox

http://essencesofdotnet.blogspot.in/#!/2011/09/how-to-apply-watermark-to-textbox-and.html

If this helps you .
Please "Mark as Answer"

Arun.Padmanaban, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dotnetrajanikanth on: 7/17/2012 [Member] Starter | Points: 25

Up
0
Down
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/TextBoxWatermark/TextBoxWatermark.aspx

____________
www.flickr.com/photos/psdesigner/

Arun.Padmanaban, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ranjeet_8 on: 7/17/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
look at this url
it will help u
http://www.codeproject.com/Articles/36809/TextBox-Watermark-Using-JavaScript-and-CSS

.

Arun.Padmanaban, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 7/18/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

refer this link

http://www.codeproject.com/Articles/24575/Change-Textbox-Input-background-color-on-focus

R D Patel

Arun.Padmanaban, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response