Solved

Javascript to format text to all caps in Acrobat 5.0 Form

Posted on 2004-07-30
6
838 Views
Last Modified: 2008-01-09
I would like to write a Javascript function in the "format" section of a text box on an Acrobat form.  I have tried a number of things, however it will not work because of definitions.  I do not know how it needs to see things, however all I want is a format script to run so that whatever a user types into a the text box on the Acrobat form is auto formatted to ALL caps.

HELP!!

TIA

/.nick
0
Comment
Question by:Anjinsan5
  • 4
  • 2
6 Comments
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 11679121
Open up the properties dialog for your text box. Select the "Format" tab and select "Custom" for the category. In the "Custom Format Script" field enter the following JavaScript:


event.value = event.value.toUpperCase();

This will (at the time the new text field value is commited) convert the string to all caps. The string that is actually stored in the text field is still as it was entered, it's just the export value that gets modified. And, while you are entering the data, you will not see the upper case characters.

Is this what you want?
0
 

Author Comment

by:Anjinsan5
ID: 11679353
I would like to be able to SEE the character as upper case...is there a way to do this?

/.nick
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 11679429
Do you want to see them as you type? The caps string is displayed one you leave the field (with either RETURN, or TAB).
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
ID: 11679533
If you want every keystroke to be converted to caps right away, use this script in the "Custom Keystroke Script" field:

event.change = event.change.toUpperCase();

0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 11691963
Is this now working as you expect it to work?
0
 

Author Comment

by:Anjinsan5
ID: 11708415
Works now!  Sorry for the delay!

/.nick
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Can Be Caused By Disabled Services I have encountered a problem viewing PDF files using Adobe Acrobat Reader.  For the longest time, PDFs might launch or might not.  Sometimes they took about 15 minutes to appear after launching them. After som…
This article is in response to a question here (http://www.experts-exchange.com/Other/URLs/Q_28283850.html) at Experts Exchange. The Original Poster has a scanned signature and wants to make the background transparent so that the signature may be pl…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question