P
Paul E. Schoen
I am trying to use a date/time picker script that is found on
http://www.javascriptkit.com/script/script2/tengcalendar.shtml.
It consists of a simple Demo.HTM file which also uses a cal.GIF and a
datetimepicker.JS. The HTML file will load in IE7 and Firefox, but in IE7
the calendar function shows an error on line 122 saying "access is denied".
Here are the lines from the JS:
(line 121) winCal=window.open("","DateTimePicker", "toolbar=0, status=0,
menubar=0, fullscreen=no, width=195, height=245, resizable=0,
top="+cnTop+", left="+cnLeft);
(line 122) docCal=winCal.document;
I ran the script using the Java Runtime of Arachnophilia and it stopped
with an error of java.class.NoClassDefFoundError: datetimepicker. But the
demo.htm runs OK on Firefox, and IE7 runs the on-line demo (although it
flagged an error once).
When I copied and pasted the JavaScript into the document-level of Nitro
PDF, I got an error on the line:
(line 62) exDateTime=document.getElementById(pCtrl).value;
saying getElementByID is not a function. So I changed it as follows:
(line 62) exDateTime=document.getField(pCtrl).value;
It said IIRC "document is not defined". I noticed that Nitro PDF uses doc
instead of document, but in the JavaScript I used to call the function, I
tried:
var document = doc;
NewCal('Text0','mmddyyyy');
and now it said doc is not defined.
Then I tried to see if I could run the two supposedly equivalent statements
as shown below, but apparently "this" works but not "doc". So I set
document = this:
var v1 = this.getField("Text1");
//var v2 = doc.fieldName("Text1") // doc gives an error not defined
var document = this; // Allows script to execute line 62
NewCal('Text0','mmddyyyy'); // Call function in document level JS
But now I get an error on line 121:
winCal=window.open(...
saying "window" is not defined. I think "window" is not a supported object
in Nitro PDF. So, I suppose I am stuck? Maybe I should try Adobe Pro? Or am
I doing something wrong? Thanks,
Paul
http://www.javascriptkit.com/script/script2/tengcalendar.shtml.
It consists of a simple Demo.HTM file which also uses a cal.GIF and a
datetimepicker.JS. The HTML file will load in IE7 and Firefox, but in IE7
the calendar function shows an error on line 122 saying "access is denied".
Here are the lines from the JS:
(line 121) winCal=window.open("","DateTimePicker", "toolbar=0, status=0,
menubar=0, fullscreen=no, width=195, height=245, resizable=0,
top="+cnTop+", left="+cnLeft);
(line 122) docCal=winCal.document;
I ran the script using the Java Runtime of Arachnophilia and it stopped
with an error of java.class.NoClassDefFoundError: datetimepicker. But the
demo.htm runs OK on Firefox, and IE7 runs the on-line demo (although it
flagged an error once).
When I copied and pasted the JavaScript into the document-level of Nitro
PDF, I got an error on the line:
(line 62) exDateTime=document.getElementById(pCtrl).value;
saying getElementByID is not a function. So I changed it as follows:
(line 62) exDateTime=document.getField(pCtrl).value;
It said IIRC "document is not defined". I noticed that Nitro PDF uses doc
instead of document, but in the JavaScript I used to call the function, I
tried:
var document = doc;
NewCal('Text0','mmddyyyy');
and now it said doc is not defined.
Then I tried to see if I could run the two supposedly equivalent statements
as shown below, but apparently "this" works but not "doc". So I set
document = this:
var v1 = this.getField("Text1");
//var v2 = doc.fieldName("Text1") // doc gives an error not defined
var document = this; // Allows script to execute line 62
NewCal('Text0','mmddyyyy'); // Call function in document level JS
But now I get an error on line 121:
winCal=window.open(...
saying "window" is not defined. I think "window" is not a supported object
in Nitro PDF. So, I suppose I am stuck? Maybe I should try Adobe Pro? Or am
I doing something wrong? Thanks,
Paul