Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Designer
Viewing all articles
Browse latest Browse all 16286

Changing Global Variables using Javascript

$
0
0

Hi,

 

I have a project where I need to have lots of signature fields on a single form. I don't want to use a signatureField because this will increase the file size every time a signatureField is signed. Also client does not want digital signatures.

 

I set up three user variables (for both usernames and passwords), using Form/Properties/Variables.

 

I then set up a dialogue box on the click event of a button, which requests the username and password. If these match the global variables, then the associated textField is populated with the user's credentials. I got this to work OK.

 

The problems stated when I gave the user the ability to change their password. This would be an important, as the form would not need to come back to me to hardwire in the new password.

 

One of the global variables is "Pass1".The following script changed the value of the variable, but would not hold the change when the form was reopened:

 

     Pass1.value = AHSC02.strnewP;

 

".value" shouldn't work, but it did???

 

So I tried different versions of ".rawValue", but with no sucess:

 

     Pass1.rawValue = AHSC02.strnewP;

     form1.Pass1.rawValue = AHSC02.strnewP;

     form1.variables.Pass1.rawValue = AHSC02.strnewP;

 

Using ".rawValue" wouldn't change the password variable at all, even in the same session.

 

28-06-2009 16-02-14.png

 

I would be very grateful if anyone had an idea as to how to change the global variable using Javascript, which will hold when the file is saved and reopened.

 

".value" works within the session, but doesn't hold the value on reopenning.

 

I am attaching a sample form, with three signing buttons/fields.

 

Username1 = Niall O'Donovan     Password = nod

Username2 = Marianne Barry     Password = mb

 

I have initially set up the "Niall O'Donovan" account with .rawValue and the "Marianne Barry" account with .value scripting.

 

I am wondering if this is considered a security issue by Adobe and therefore we are restricted from changing global variables using Javascript???

 

Thanks,

 

Niall


Viewing all articles
Browse latest Browse all 16286

Trending Articles