Click here to Skip to main content
14,641,690 members
Rate this:
Please Sign up or sign in to vote.
See more:
I have two textboxes.
First is B1,
Second is B2.

(B1)capacity - TextBox1
(B2)Total Quantity - TextBox2

If we enter value in B1.
//multiply B1 by 13 and multiply by no. of days in current month.
//(calculated Value)

now enter value in B2.
//(entered Value)


IF calculated value is less than entered value then it should change color of font. Change from black to Red.


how Can i Done it in Using JavaScript.
Plz help........
Posted
Updated 5-Apr-12 3:34am
v3
Comments
ZurdoDev 5-Apr-12 9:06am
   
So what is the question? Have you researched how to change the color? What have you done so far? If you are using jQuery it is easy.
Macsol12 5-Apr-12 9:16am
   
actually i am preparing a report.
i am using asp.net with vb. u can suggest in jQuery. but i prefer Javascript.
i dont have researched anything. i want to know that how it can be done in Javascript.
Rate this:
Please Sign up or sign in to vote.

Solution 1

$("element selector").css("color", "color value");


If you did just a small amount of research you would see how easy this is to find and use.
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

Looks suspiciously like homework.
Homework (Compliments of JSOP)[^]
   
Comments
Macsol12 5-Apr-12 10:22am
   
What do you want to show?? if u dont have any idea then go and enjoy urself. no need to suggest anything.
fjdiewornncalwe 5-Apr-12 11:29am
   
I love to write code and learn new things about my job every day. Being at work, I am enjoying myself.
You want us to do your homework which indicates to me that you lack any drive whatsoever to become a good programmer. My answer stands as valid as you should rethink what you want to do for a living and perhaps learn the phrase "do you want fries with that" if you don't want to improve your attitude.
bbirajdar 5-Apr-12 10:46am
   
He means to say that you should have learnt some basic javascript before joining a job in software development. If you are not able to understand what marcus says, then I am posting the contents of the link here . Read it again -"We don't do homework for people - not because we feel like we're elite or too
important, but because YOU won't learn anything if we do it for you. If you try to
do it and have a problem with a particular part of the code, come back here and ask
a question about THAT particular part of the code - NOT the entire application. If
you don't learn these basic/essential skills now, you may as well decide on another
career path before you put another - BETTER - programmer out of work simply
because of your lower salary requirements."
bbirajdar 5-Apr-12 10:48am
   
Your employer must have hired you because you must be ready to work on lower wages. Your skill level is far below the basic requirements of a software developer.

You should either try to upgrade your skills or search for a job in some other stream.
bbirajdar 5-Apr-12 10:50am
   
People gather here to help the other programmers to solve their "difficulties" and not to write complete code for them. In other words, you should show us what efforts you have done and the difficulty you are facing. Then they can 'help' you.
bbirajdar 5-Apr-12 10:51am
   
@Marcus, I am giving you 5 to compensate the 1 star this guy gave to your solution.
fjdiewornncalwe 5-Apr-12 11:41am
   
Thanks
bbirajdar 5-Apr-12 10:53am
   
The question you have posted is the basic ABCD in javascript which every programmer learns on the first day of the javascript lesson..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100