Answered
Hello,
I have been using a multiline text field to display the Day and date. The day of the week was on the top line and the month, day and year were on the second. Acrobat 8 displays 'undefined'. When I remove the escaped characters '\n' the value is displayed. Of course the line feed is missing.
original code:
event.target.value = util.printd("dddd\nmmm dd, yyyy", new Date());
Displayed:
Saturday
February 16, 2008
current work-around:
event.target.value = util.printd("dddd mmm dd, yyyy", new Date());
Displayed:
Saturday February
16, 2008
If I make the text box narrower the certain months may not fit on the second line properly.
Is there a new way to generate a line feed (newline) in the util.printd syntax?
Thanks in advance.
var dt = new Date();
event.target.value = util.printd("dddd", dt ) + "\n";
event.target.value += util.printd("mmm dd, yyyy", dt );
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script