Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Script changes caption to italic font

Avatar

Level 9

I am using the following script to add what looks like help text in gray italics in the value fields. The problem I am having is that the date objects captions are also changing to italics but only after I save the file and reopen it ( I am running Acrobet X). How can I prevent/fix this?

form1.#subform[0].Subform5.CurrentMeetingDate::initialize - (JavaScript, client)
this.execEvent("exit");
this.format.picture.value = "null{'" + this.assist.toolTip.value + "'}";

form1.#subform[0].Subform5.CurrentMeetingDate::enter - (JavaScript, client)
this.fontColor = "0,0,0";
this.font.posture = "normal";

form1.#subform[0].Subform5.CurrentMeetingDate::exit - (JavaScript, client)
if (this.isNull)
{
this.fontColor = "153,153,153";
this.caption.font.fill.color.value = "0,0,0";
this.font.posture = "italic";
}


form1.#subform[0].Subform5.CurrentMeetingDate::prePrint - (JavaScript, client)
this.format.picture.value = "";

form1.#subform[0].Subform5.CurrentMeetingDate::postPrint - (JavaScript, client)
this.format.picture.value = "null{'" + this.assist.toolTip.value + "'}";

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 9

Taking another look at this problem. Shouldn't the correct answer above read,

this.caption.font.posture = "normal";

not have the .value

View solution in original post

3 Replies

Avatar

Level 10

Hi,

The initialize script is firing the exit event.

In the same way as you specifically change the colour of the caption font, you could change the posture of the caption as well.

this.caption.font.posture.value = "normal";

Hope that helps,

Niall

Avatar

Level 9

Thanks Niall - that took care of the problem.

-Don

Avatar

Correct answer by
Level 9

Taking another look at this problem. Shouldn't the correct answer above read,

this.caption.font.posture = "normal";

not have the .value