Click here to Skip to main content
15,898,134 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Control that automatically drags when page is scrolled down Pin
CandyMe29-Oct-07 17:38
CandyMe29-Oct-07 17:38 
QuestionI used nant to build ASP .NET application Pin
balpanbh14-Oct-07 18:36
balpanbh14-Oct-07 18:36 
AnswerRe: I used nant to build ASP .NET application Pin
Paddy Boyd15-Oct-07 2:49
Paddy Boyd15-Oct-07 2:49 
Question[modified]To set the borders of the layers in javascript. Pin
gopal_Pandey13-Oct-07 5:17
gopal_Pandey13-Oct-07 5:17 
AnswerRe: set layers border using javascript Pin
Guffa13-Oct-07 6:33
Guffa13-Oct-07 6:33 
AnswerRe: set layers border using javascript Pin
Hesham Amin13-Oct-07 22:41
Hesham Amin13-Oct-07 22:41 
QuestionDigest Authentication NIGHTMARE Pin
erikkl200012-Oct-07 17:31
erikkl200012-Oct-07 17:31 
QuestionChange Textbox Color Using Javascript Pin
stormcandi12-Oct-07 11:27
stormcandi12-Oct-07 11:27 
Hello,
I know this question has been asked everywhere but I cannot find a solution that will help me. I hope someone here has some ideas.

I have 9 TextBoxes in a Repeater Control. A user can edit dates in these textboxes. If the user changes the date, I want to dynamically change the color of the background of the textbox. When the data is saved I will set the textboxes back to it's original background(I can do this in the code-behind)
Right now I can get it to change but I have to do a postback in order to do it on the TextChanged Event of the TextBox. This page has 14 rows with 9 textboxes in each so postbacks are tedious to the user after 3 of them.
Can anyone help me accomplish this in Javascript?

This is in my code-behind:

foreach (RepeaterItem item in rptrShots.Items)
 {
      TextBox txt1 = (TextBox)item.FindControl("txt1");
       txt1.Attributes["onTextChanged"] = "ChgColor('" + txt1.UniqueID + "');";
 }


This is in the mark-up:

<script language="javascript" type="text/javascript"> 
function ChgColor(sender)
{
    sender.style.backgroundColor = '#CC3300';
}
</script>


I am just so frustrated that I am following similar code to do similar things but it isn't working for me. I don't know if it is because my textboxes are in a repeater or not.

Please help!!!

Confused | :confused:

Thanks in advance!


~Candi

AnswerRe: Change Textbox Color Using Javascript Pin
Guffa13-Oct-07 0:44
Guffa13-Oct-07 0:44 
GeneralRe: Change Textbox Color Using Javascript Pin
stormcandi15-Oct-07 10:54
stormcandi15-Oct-07 10:54 
Questionrequest.GetResponse() problem Pin
Borryz12-Oct-07 1:44
Borryz12-Oct-07 1:44 
AnswerRe: request.GetResponse() problem Pin
kubben12-Oct-07 2:09
kubben12-Oct-07 2:09 
GeneralRe: request.GetResponse() problem Pin
Borryz12-Oct-07 3:23
Borryz12-Oct-07 3:23 
AnswerRe: request.GetResponse() problem Pin
Vasudevan Deepak Kumar12-Oct-07 2:45
Vasudevan Deepak Kumar12-Oct-07 2:45 
GeneralRe: request.GetResponse() problem Pin
Borryz12-Oct-07 3:29
Borryz12-Oct-07 3:29 
QuestionYAHOO.widget.AutoComplete Pin
ankushmn12-Oct-07 0:01
ankushmn12-Oct-07 0:01 
QuestionLogout problem Pin
abhishek.mumbai11-Oct-07 23:40
abhishek.mumbai11-Oct-07 23:40 
AnswerRe: Logout problem Pin
Hesham Amin13-Oct-07 22:43
Hesham Amin13-Oct-07 22:43 
AnswerRe: HTTP 500 - Internal server error. Pin
Vasudevan Deepak Kumar12-Oct-07 2:43
Vasudevan Deepak Kumar12-Oct-07 2:43 
QuestionJavascript : Similar to match Pin
ss.mmm11-Oct-07 5:21
ss.mmm11-Oct-07 5:21 
AnswerRe: Javascript : Similar to match Pin
andyharman11-Oct-07 6:44
professionalandyharman11-Oct-07 6:44 
Questionfree lancing Pin
Kartik Rathi11-Oct-07 1:20
Kartik Rathi11-Oct-07 1:20 
AnswerRe: free lancing Pin
Vasudevan Deepak Kumar12-Oct-07 2:44
Vasudevan Deepak Kumar12-Oct-07 2:44 
QuestionIE7 and Firefox appearance conflict Pin
Dave2560011-Oct-07 0:10
Dave2560011-Oct-07 0:10 
AnswerRe: IE7 and Firefox appearance conflict Pin
Guffa13-Oct-07 0:50
Guffa13-Oct-07 0:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.