Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Active JavaScript Field Batch Sequence

Status
Not open for further replies.

sepb

Technical User
Aug 1, 2002
11
NL
Is it possible to add an active JavaScript function
to a form field created with / thru a batch sequence?

So that each time the document opens the Current date
is displayed?
(If possible, can someone please help me with the code
to add to the current code below?)

Because now when the Batch Sequence runs over the
selected files it only displays the Date of when
the Sequence was done. (Now it only creates a flat
text “body” field)

Here is a sample of the Script I’m running now;

var thisfieldis = this.addField("mydate", "text", 0, [20, 60, 200, 20]);
var newdate = new Date();
var expdate = new Date() ;
with (expdate) setDate(getDate()+7);
var theprint = "Print date";
var theday = util.printd("dddd",newdate);
var thedate = util.printd("d",newdate);
var themonth = util.printd("mmmm",newdate);
var theyear = util.printd("yyyy",newdate);
var theexp = " Expiration date";
var thexday = util.printd("dddd",expdate);
var thexdate = util.printd("d",expdate);
var thexmonth = util.printd("mmmm",expdate);
var thexyear = util.printd("yyyy",expdate);
thisfieldis.value = theprint + " " + theday
+ " " + thedate + ", " + themonth + " " + theyear
+ theexp + " " + thexday + " " + thexdate + ", "
+ thexmonth + " " + thexyear;

Thanks for helping!
 
Never mind I figured it out my self and it works fine now.
 
Could you tell me how you got the time in there please? I'm tring to do the same thing :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top