These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Calendar

oiko
Registered: Jan 10 2008
Posts: 2

I have a 12 page document with an image of each month from a typical calendar on each page. I want javascript code to open the document at each month depending on the date of the year when the document is opened; for example, if a user opens the calendar throughout the month of July, the document opens to page 7, when the user opens the document during the month of August, the document opens on page 8, etc., etc., throughout the year. Any thoughts?

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
Since each month is a page, just get the month from the current date and use that value less 1, to adjust for the zero based page numbering, as the page number. You cam place the code in a document level script so it runs whenever the document is opened.

// go the the zero based page using the month value from the current date - 1
this.pageNum = util.printd("m", new Date()) - 1;

George Kaiser