Previous | Next | (P-PDF) JavaScript
Topic: Re: conditional alert box (Via Email)
Conf: (P-PDF) JavaScript, Msg: 27522
From: prodok
Date: 9/23/2001 01:15 AM
Syntax issues again.
Get the JavaScript 1.5 Core specification from the developer section
of the Netscape website, and look at the syntax of the Date object
constructor. (hint: when you have just numbers, you don't need the
quotes, and you will also have to make sure that you have the correct
order of the arguments).
You might try your syntax for the referenceDate in the Console.
Actually, your referenceDate is "undefined"...
Keep in mind, JavaScript does exactly what you tell it to do... EXACTLY....
Hope, this can help.
Max Wyss
PRODOK Engineering
Low Paper workflows, Smart documents, PDF forms
CH-8906 Bonstetten, Switzerland
Fax: +41 1 700 20 37
e-mail: mailto:max@prodok.com
http://www.prodok.com
[ Building Bridges for Information ]
______________________
Shameless Plug:
I will have presentations and pre- and post-conference workshops at
the .PDF2001 West Conference in Scottsdale, AZ, Nov. 5 to 7, 2001.
More details at http://www.pdfconference.com.
Workshops:
Nov. 4: Implementing Business Processes based on PDF
Nov. 8: Enhancing PDF Forms
_________________________
>Okay...Now I'm pretty confused. Please forgive me if I insist, I'm a
>total non-programmer, so...
>
>I had already tried a script like yours, but the alert box opens up always!
>
>I used your script, even though I didnt undertand you when you said
>"convert your reference date".
>
>I tried this:
>
>var referenceDate = new Date("02,11,2001") ;
>var now = new Date() ;
>if (now > referenceDate) {
>i = app."Attenzione: il documento corrente potrebbe non essere
>aggiornato!", 1, 0);
>} ;
>
>the alert box should open up only after November 02 2001...But it
>always shows up
>