Javascript question

I created this form image this is a screenshot of the area of the form i am working onAnd in the field “due date” I added the custom format

if (!event.value) {
event.value = "DATE";
event.target.display = display.noPrint;
event.target.textColor = color.ltGray;
event.targer.fontWeight = 'bold';
} else {
event.target.display = display.visible;
event.target.textColor = color.black;
}

Basically what it does is that it’s light grey originally, and it tells the user to input a “DATE.” When the user inputs a date, the word “DATE” disappears and the font turns black. This works fine.. .but what doesn’t work is making the text bold
alafairAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ste5anSenior DeveloperCommented:
Typo. There is a r where a t should be. It's target, not targer.
0
alafairAuthor Commented:
oops I know even when corrected does not work how can I edit my orig post?
0
alafairAuthor Commented:
if (!event.value) {
 event.value = "DATE";
 event.target.display = display.noPrint;
 event.target.textColor = color.ltGray;
 event.target.fontWeight = 'bold';
 } else {
 event.target.display = display.visible;
 event.target.textColor = color.black;
 }
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

ste5anSenior DeveloperCommented:
What is target? What frameworks do you use?
0
alafairAuthor Commented:
the target is the field where the date is, when someone enters a date I want it to be bold but otherwise just display the word date in a light gray faded word date, Frameworks?
0
Julian HansenCommented:
And if you do

event.target.style.fontWeight = 'bold'

Open in new window

0
alafairAuthor Commented:
I'm actually helping someone so I will have him try that and will let you know.  Thank you
0
alafairAuthor Commented:
ok event.target.style.fontWeight = 'bold' did not work, how about an event to change the font to a font that is already bold like helvetica bold?
0
Julian HansenCommented:
Without a context for where event comes from we can only guess.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.