PDF-Forms is a service provided by PDFzone.com | http://www.pdfzone.com/
__________________________________________________________________

Yikes!

I got ahead of myself here - this script is dangerous!  It erases
ANYTHING in the field, not just the default text.  So if the user has
filled the field out and then runs the mouse over it, it erases what the
user input.

So I'd like to propose a slightly more involved solution...

Lets assume the default text is "Enter Name Here"

The script would look like this:

var a = this.getField('NameOfCurrentField');
if (a.value == "Enter Name Here") a.value = "";

You would have to input the default text into each script for each
field.

This will now only work if the default text is displayed (either by
default of if the user typed it back in...)

Sorry about the hasty response.  TreeBeard would be most amused.

Mark

-----Original Message-----
From: Lauterbach.Mark 
Sent: February 4, 2004 1:08 PM
To: [EMAIL PROTECTED]
Subject: RE: [PDF-Forms] Clearing Default Text on Focus?



PDF-Forms is a service provided by PDFzone.com | http://www.pdfzone.com/
__________________________________________________________________

Hello, mystery subscriber... (no address? - most bizarre)

I would handle this issue in the following way:

In the "Mouse Enter" and "On Focus" actions in each field, add the
following script:

var a = this.getField('NameOfCurrentField');
a.value = "";

This will clear the default text as soon as the user enters it.

Mark


-----Original Message-----
From: [mailto:[EMAIL PROTECTED] 
Sent: February 4, 2004 12:50 PM
To: [EMAIL PROTECTED]
Subject: [PDF-Forms] Clearing Default Text on Focus?



PDF-Forms is a service provided by PDFzone.com | http://www.pdfzone.com/
__________________________________________________________________

Hello All

I have a form in which a few of the fields have example text (entered
via Field Properties > Options > Default). The example text is something
like "Name and Extension". It is there to prompt the user to include the
needed information when filling out the form.

I'd like the example text to disappear when the user puts their cursor
in the text box. I saw "clearitems" in the Acrobat JavaScript Object
Specification, but that does not apply to text boxes.

Any ideas on how to accomplish this would be appreciated. Thanks in
advance fo ryour help.


To change your subscription:
http://www.pdfzone.com/discussions/lists-pdfforms.html


To change your subscription:
http://www.pdfzone.com/discussions/lists-pdfforms.html


To change your subscription:
http://www.pdfzone.com/discussions/lists-pdfforms.html

Reply via email to