Planet PDF Forum Archive

Planet PDF  ForumThe page you are viewing is part of our 160,000 page discussion forum archive. See below for PDF-related discussions spanning 1999-2008. To ask questions and get help, head to the live Planet PDF Forum.


How to search this archive. The quickest way is to use the filters on our Advanced Search page so that only archive pages are included in the results.


Previous | Next | (P-PDF) JavaScript


Topic: Timesheet w/ auto dates
Conf: (P-PDF) JavaScript, Msg: 28632
From: evilfrogmonster
Date: 10/17/2001 05:57 AM

I have a timesheet in .PDF format, and there is a field where you can enter the "Period start date". I want to enter the start date, and have the rest of the dates automatically computed. So for example:

Period Start Date: 10/21/01 .. and then the rest of the fields like Sun: 10/21/01, Mon: 10/22/01.. etc etc.

So, the problem is with referencing the cells together.
If I hardwire a date, I can compute the next date easily. But, when I try to reference the date located in the "end date" field, I get an error.

Here is my code:
//Author Kristine Theobald
var a = this.getField("7");
var b = new Date(a); //Date takes a string argument
var c = new Date(b.getYear(),b.getMonth(),b.getDate() + 1);
var d = this.getField("8");
c.value = util.printd("mm/dd/yy", c);

//end

if i type in var a = "12/25/01"; the whole thing works, and it calculates the next date. I have tried numerous things in the start date field as well. I have tried getting the value and converting it to a string. I am just wondering if there is anything I've missed?

Kristine Theobald
Boise State University

PDF In-Depth Free Product Trials Ubiquitous PDF

Pitstop Pro

Now graphic arts professionals have even broader and more expert control over their PDF documents. With...

Download free demo

ARTS PDF Aerialist

The ultimate plug-in for Adobe Acrobat and #1 selling product at PDF Store. Advanced splitting, merging,...

Download free demo

Ubiquitous PDF: Free short film distribution guide released

Nigel Smith, an award-winning producer of short films, has released a free PDF guidebook to help budding filmmakers find wider audiences for their short films.

December 04, 2008
Search Planet PDF
more searching options...




PDF Resources
Platinum Sponsor
Create & Edit PDF - Nitro PDF Software

ARTS PDF

Silver Sponsors

PDF-Tools enfocus

FileOpen PDFNet SDK: PDF Component. Cross-platform PDF library

PDF Converter: Create, Convert PDF to Word/Excel Visual Integrity: Convert, Create, Extract, Merge and Modify PDF

Debenu: Desktop Document Management, Archiving and Tagging Software SmartSoft

Get Nitro PDF Professional
Featured Product

NITRO PDF Professional

Built from the ground up, the perfect desktop PDF product for business and enterprise. Nitro PDF Professional has an uncompromising feature set so you can create, combine, edit, collaborate on and...

Featured Event

No upcoming events

PDF Store Categories