473,394 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Change backgroundcolor on forms

How can I change the background color of a textfield when it gets the focus?
Nov 10 '06 #1
3 1020
AricC
1,892 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. <input type="text" onfocus = "this.style.backgroundColor='red'" name="Email" />

HTH,
Aric
Nov 10 '06 #2
Thanks! It works, but now...how can I change it back to the old color (say white) when the textfield lost the focus?
Nov 11 '06 #3
r035198x
13,262 8TB
Thanks! It works, but now...how can I change it back to the old color (say white) when the textfield lost the focus?
Use onblur
Nov 12 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: RWD | last post by:
I am trying to figure out how to change the target frame in my hyperlink on a DHTML menu. The menu is in one frame and the target frame is called "main" The code is below: Thanks in advance...
1
by: ms | last post by:
Hi, I've been trying to find a way to change a cell's colour when clicking it. What I've found so far is to change the background colour by using: function whenClick(navElm) { var state1 =...
3
by: Peter Williams | last post by:
Hi All, I want to write some javascript for a html page which does the following. Imagine that the page contains a table with 2 columns and 3 rows, e.g.: +---+---+ | A | B | +---+---+
4
by: Alexandre Jaquet | last post by:
Hi, I would like to know how can I change a row background color when an user select a row thx
1
by: karunakar | last post by:
Hi All, I want to deselect the row in DATAGRID. in ASP.NET application. I was alredy selected in datagrid row .I want to change another row in same datgrid . Here in my datagrid was selected...
6
by: sr | last post by:
please help i have problem: I know how to change color row in table when my mouse is over on this row and change color to another color when my mouse is out from this row. but i dont know how to...
2
by: shapper | last post by:
Hello, How can I change the background color of an Asp:Panel when the mouse is over it? Thanks, Miguel
2
by: itsenthil | last post by:
This is my UserControl(ascx) coding, it is not working plz help me to rectify the error.....what is wrong in that one..... <%@ Control Language="vb" AutoEventWireup="false"...
10
by: LayneMitch via WebmasterKB.com | last post by:
Hello. I'm trying to figure out why this isn't working... <html><head><title>Prob.11</title> <script type="text/javascript"> function attachHandlers { var...
18
by: wizdom | last post by:
Help - change text on click - text has another onclick inside with php variables ---------- I think what I'm trying to do is simple. I have a 2 buttons on a page. 1 button allows a thread of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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...
0
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
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...

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.