These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

How to mask input character

nmc091
Registered: Jan 13 2009
Posts: 15

Hi,

I have this password prompt box whenever user will open the file, how can I make the password shown as * when the user types in the prompt box? I have coded like this:

var pass = app.response("Please enter Password:", "Document Control Only");

Lastly in the prompt box how can I remove the "Warning: Javascript Window" title?

Thank you for any response.

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
With LiveCycle Designer you can select a 'password' field from the library of fields.

With Acrobat Forms tool you need to use the 'app.response()' method with the password parameter enabled.

George Kaiser

nmc091
Registered: Jan 13 2009
Posts: 15
thanks for the response, what I did is I created a text field. At the docReady event of the text field, I called a prompt box using var pass = app.response("Please enter Password:", "Document Control Only"); So without using the password field in the library, how can I display the input string as '*'?
Because if I use the password field given in the library, how can I show it as a pop up box?
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
I do not think there is a way because there is no password response popup and no password field for the appliction dialog objet.

To remove the JavaScript warning, you will need to create a foder level trusted function or certify the final form.

George Kaiser

sclark1
Registered: Feb 23 2009
Posts: 20
app.response("Response prompt goes here.","Title","Default Text", 1)
vomit
Registered: Feb 11 2009
Posts: 8
I don't use LiveCycle, but in regular Acrobat:

app.response has the parameter of bPassword. If it is set to True, the response field is masked with asterisks.
nmc091
Registered: Jan 13 2009
Posts: 15
The script app.response("Response prompt goes here.","Title","Default Text", 1) did mask the input string to '*'. The problem now is the title text is displaying Warning: JavaScript Window - Title. How can I remove the "Warning: JavaScript Window" and what is the 1 used for?
sclark1
Registered: Feb 23 2009
Posts: 20
nmc091 wrote:
The script app.response("Response prompt goes here.","Title","Default Text", 1) did mask the input string to '*'. The problem now is the title text is displaying Warning: JavaScript Window - Title. How can I remove the "Warning: JavaScript Window" and what is the 1 used for?
This changed in version 7 with the trusted functions, you will have to certify each document to get rid of it. Do a search on here there should be plenty of info about it.
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
You can also create a folder level script to call the 'app.alert' as a trusted function with privileges. But this folder level scrip will need to be added to each users system.

George Kaiser