I have the following code at the folder level:
// Folder level script to create an application level variables for the "identity" objects properties
var Identity = new Array();
Identity.Corporation = identity.corporation;
Identity.Email = identity.email;
Identity.LoginName = identity.loginName;
Identity.Name = identity.name;
trustedIdentity = app.trustedFunction( function (sProperty) {
var iProperty = "";
app.beginPriv(); // explicitly raise privilege
iProperty = Identity[sProperty];
app.endPriv();
return iProperty;
})
I have 2 text fields, thats running the following mouse up event script:
if (event.target.value !== "Off"){
this.getField("SampleText4").value = Identity.LoginName;
this.getField("SampleText4").readonly=true;
} else {
f.value = "Click here...";
}
var rButton = event.value("Reset6");
if (rButton == "ON"){
this.getField("SampleText4").readonly=false
};
The other text field is named "SampleText12" in the code. My userID shows up on SampleText4 field, and then I'll save the file. I ask another user to open the file, (he has the .js [plug-in] file in his Javascripts folder already), when he tries to click on SampleText12 field, nothing happens. But when I open that same file, my userID will appear in SampleText12 field.
Is the JS file located in the appropriate either the folder for the application or user folder level scripts?
Note: you might not be able to place the folder level script in the same folder as on your system. The file path for application and user folder level JavaScripts are dependent upon the version of Acrobat installed and the user login name.
George Kaiser