473,498 Members | 1,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Change ForeColor of asp.net text box

Jim
Hey all, I'm trying to change the forecolor of asp.net textbox text as
I mouse over them. I keep getting a javascript error that the item
doesn't exist when trying to reference it by it's ID. Any help would
be appreciated.

Nov 19 '05 #1
1 3677
Give something like this a shot:

[in asp]

<asp:textbox ... onmouseout = "changecolor(this, 'black');" onmouseover =
"changecolor(this, 'red');" ... />

[in js]

changecolor(something, somecolor)
{
something.style.color = somecolor;
}

"Jim" <je******@comcast.net> wrote in message
news:11*********************@c13g2000cwb.googlegro ups.com...
Hey all, I'm trying to change the forecolor of asp.net textbox text as
I mouse over them. I keep getting a javascript error that the item
doesn't exist when trying to reference it by it's ID. Any help would
be appreciated.

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
12331
by: TF | last post by:
Hi, Is there any way to change the text color of SOME of the ListBox(Windows Forms Control) items in VB.NET? TF
2
3885
by: Xiphias | last post by:
Hi, Im trying to change the color of a text box on a report that im printing from a form. On the form I got a check box that has to tricker the color of that textbox on the printed report....
3
2231
by: Nick J | last post by:
Hi, I have seen exampled were if value is > x then change font/colour/etc. How would I go about doing the same except I would like it so that it changes if there is ANYTHING in the text box. ...
4
3017
by: rkbnair | last post by:
I have an image placed on an aspx page. <img id="xyz" onMouseOver="abc()" src="c:\temp\ijk.jpg"> My Text to Display How can I change the forecolor of the text 'My Text to display' in function...
0
1534
by: csgraham74 | last post by:
Hi there, i have creted a datagrid control to display images using the following code. <asp:DataGrid id="dg_Properties" runat="server" HorizontalAlign="Center" Width="450px"...
9
1411
by: matt | last post by:
is it possible to change a setting, such as Forecolor for all text in a form, or do you have to change it for each text block?
3
3273
by: Jim in Arizona | last post by:
I have a gridview that's being populated from an access db query. The problem I'm having is that the date/time fields in access that are populating the gridview are showing both date and time, when...
2
12092
by: Phillip Vong | last post by:
Newbie learning in VB.NET Stupid question. I have Label1.Text = "Hello World" How do I change the Forecolor in code? I know how to set it using VS but I want to change the Forecolor...
1
2578
by: dhaneshrs | last post by:
I have a small code that shows inactive and active users from the ms access DB. <%@ Page Language="VB" MasterPageFile="~/MasterPageAdmin.master" Title="Welcome" %> <%@ Import...
3
29291
by: CSharper | last post by:
Is it possible to selectivly change the color of an item in text. I saw ForeColor option, but it changes the color of all the items. If it is not possible, is there any other control list listbox...
0
6998
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7163
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6884
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4586
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1416
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.