Solved

Javascript to format text to all caps in Acrobat 5.0 Form

Posted on 2004-07-30
6
870 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Update 21-May-2015: I temporarily removed the source code and the code snippets to make major changes to the program. Regards, Joe INTRODUCTION This Article is a follow-up to the Article entitled How To Rename-Move a Batch of PDF Files Based o…
PDF files have been in the limelight due to its unmatched features.  Personal documents, emails, business reports and eBooks are all converted into PDF files owing to peerless features provided by it. Adding watermark to a PDF file is a method to se…
In this first video of the three-part Xpdf series, we introduce and describe Xpdf, a library containing nine command line utilities that perform various functions on PDF files. We show where the library is located and how to download it, discuss its…
In this video, we show how to perform Bates Numbering/Stamping of PDF documents using Power PDF Advanced, the newest product from the Document Imaging division of Nuance Communications. There are two editions of Power PDF — Standard and Advanced. Th…

690 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