473,398 Members | 2,403 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,398 software developers and data experts.

textbox color change when data is update

102 100+
hi... i have plenty of textbox containing the data... when the user update some of the textbox... how can i change the textbox become yellow to show that the data in that textbox has been updated... pls help..thanks

i have tried style"background-color:red"..but nothing come out

also how do i make the date in the textbox so that it cannot be modified.. only can see..
Jun 20 '07 #1
7 3703
improvcornartist
303 Expert 100+
hi... i have plenty of textbox containing the data... when the user update some of the textbox... how can i change the textbox become yellow to show that the data in that textbox has been updated... pls help..thanks

i have tried style"background-color:red"..but nothing come out

also how do i make the date in the textbox so that it cannot be modified.. only can see..
If you are using asp textboxes and style="background-color:red" does not work, you can try BackColor="#FF0000". For a textbox you can't modify, you could use the property readonly="true" or use a label instead of a textbox.
Jun 20 '07 #2
jhardman
3,406 Expert 2GB
also how do i make the date in the textbox so that it cannot be modified.. only can see..
<input type="text" name="date" value="2/13/08" readonly="true">
Jun 20 '07 #3
jhardman
3,406 Expert 2GB
hi... i have plenty of textbox containing the data... when the user update some of the textbox... how can i change the textbox become yellow to show that the data in that textbox has been updated... pls help..thanks

i have tried style"background-color:red"..but nothing come out
did you try
Expand|Select|Wrap|Line Numbers
  1. <input type="text" name="fish" value="guppy" onChange="this.style.background='yellow'">
? Is this what you wanted?

notice that the onChange isn't called until the input loses focus.

Jared
Jun 20 '07 #4
lyealain
102 100+
[quote=jhardman]did you try
Expand|Select|Wrap|Line Numbers
  1. <input type="text" name="fish" value="guppy" onChange="this.style.background='yellow'">
?

do i have to declare anything before and after that statement u gave?... what i meant was after i clicked on the UPDATE button.... all the values in each textbox which updated will be maintained and the color of that updated textbox will change to yellow...

thanks for the reply
Jun 21 '07 #5
jhardman
3,406 Expert 2GB
right, I don't think you need to declare anything here. This isn't really an asp question, so I'm not really an expert. I don't even know if this is considered part of javascript or dhtml or what. Anyway, you don't have to put anything there but the above code snippet and your background color will change. Test it in a few different browsers to make sure, but I just checked ie6 and firefox and they both worked. I didn't check with a validator.

Jared
Jun 21 '07 #6
lyealain
102 100+
did you try
Expand|Select|Wrap|Line Numbers
  1. <input type="text" name="fish" value="guppy" onChange="this.style.background='yellow'">
? Is this what you wanted?

notice that the onChange isn't called until the input loses focus.

Jared
Expand|Select|Wrap|Line Numbers
  1. <input type="textbox" readonly name="plan1" value="<%=session("p")%>" onChange="this.style.background='yellow'" style="font-size:13px; width:100px;">

i still cannot get that color after i updated the textbox..
Jun 26 '07 #7
improvcornartist
303 Expert 100+
Expand|Select|Wrap|Line Numbers
  1. <input type="textbox" readonly name="plan1" value="<%=session("p")%>" onChange="this.style.background='yellow'" style="font-size:13px; width:100px;">

i still cannot get that color after i updated the textbox..
I think the onChange fires when the user makes a change in the textbox. Since your textbox is readonly, the user can't make changes, so the onChange might not ever run. How do you update the textbox? I am not sure either, but you might have to approach this a little differently.
Jun 26 '07 #8

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

Similar topics

13
by: Paul Slavin | last post by:
I have a textbox bound to a dataview, when I update the text in the textbox no changes take place in the underlying dataset. Why is this?? any answers appreciated, as to due to the underlying...
3
by: Nic | last post by:
Hey, I have an ASP-application. In the ASPX I have an <asp:dropdownlist ..>. Now when I leave this control I want to initialisize some other fields. In window forms we uses the onleave event but...
2
by: Alpha | last post by:
Hi, I have a window based program. One of the form has several textboxes and a datagrid. The textboxes are bind to the same dataset table as the datagrid and the text changes to reflect different...
6
by: Alex | last post by:
I am a newbie to ASP.NET... What I was trying to do... but yet to succeed in... I am building a customer info database... and on default, I want to display the customer's basic information in...
4
by: John Rose | last post by:
I have one databound TextBox on a page with one button. The TextBox loads the correct SQL record data but typing a new string into the Textbox fails to change the DataSet. Any ideas? There must...
2
by: donnet | last post by:
Inside my .aspx file, I have a textbox populated with data from a dataset like this: <asp:TextBox text='<%# DataBinder.Eval(Container.DataItem, "Comment")%>' id="CommentText" runat="server"...
6
by: Frank | last post by:
Hopefully this is the correct group for this message. My previous post to (I assume) a non-.net group was not welcomed. I have a form with 7 text boxes that are all bound to fields of a...
6
by: JohnR | last post by:
I have a table with 1 row which is used to hold some application wide items (one item per field, hence I only need 1 row). I want to bind one of the fields to a textbox. After setting up the...
2
by: simon | last post by:
hello, new to vb.net, have a few questions about DataGrid. I have a dataGrid that is working pulling a dataset back from a stored proc and binding to the datagrid for display the datagrid's...
1
by: AssOnFire | last post by:
Hello, I have bound a textbox to a CustomerName column of my DB, using the data binding property, and selected it from the DataTable. when i change the text in the texbBox, i try to update the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.