Planet PDF Forum Archive

Planet PDF  ForumThe page you are viewing is part of our 160,000 page discussion forum archive. See below for PDF-related discussions spanning 1999-2008. To ask questions and get help, head to the live Planet PDF Forum.


How to search this archive. The quickest way is to use the filters on our Advanced Search page so that only archive pages are included in the results.


Previous | Next | (P-PDF) JavaScript


Topic: Re: french format number (Via Email)
Conf: (P-PDF) JavaScript, Msg: 28398
From: prodok
Date: 10/11/2001 05:22 PM

Using the substr() method is the right way. However, you do not get
the right input.

Have careful look at your code, and you will see that your variable a
is a Field object, as your variable b. A Field object has many
properties, such as background color, border line width, font size,
and value.

The substr() method is, on the other hand, a method of the String
object. See something does not match.

The very first thing to correct this is to make sure that the your
substr() method gets a string.

The next thing you will have to find out is how your a.value actually
looks. If you have the field formatted, the field value will not be
formatted. In this case, you might also use the util.printf() method,
as you have the same "raw material".

Hope, this can help.


Max Wyss
PRODOK Engineering
Low Paper workflows, Smart documents, PDF forms
CH-8906 Bonstetten, Switzerland

Fax: +41 1 700 20 37
e-mail: mailto:max@prodok.com
http://www.prodok.com



[ Building Bridges for Information ]


______________________




Shameless Plug:
I will have presentations and pre- and post-conference workshops at
the .PDF2001 West Conference in Scottsdale, AZ, Nov. 5 to 7, 2001.
More details at http://www.pdfconference.com.

Workshops:
Nov. 4: Implementing Business Processes based on PDF
Nov. 8: Enhancing PDF Forms


_________________________




>I have a form, english and french, my client require that when she
>fill out form in English version, it is automatically fill out in
>Frech version. I have a problem the French format number. I try to
>use substring function to take the number, and I use add string to
>add space between the number. I don't know why it is not working.
>
>In English version I use to add 3 fields;the total, format number as 3,465.55
>
>var a =this.getField("Total")
>var b=this.getField("Totalfrench")
>var c= a.substr(0,1);
>var d= a.substr(3,5);
>var e= a.substr(6,8);
>b.value= c.value+" " d.value+e.value
>
>
>I don't know why it is not working? Or I have to use the function
>split, or trim the number. This is try me crazy. Thank you very
>much for your hint.
>

PDF In-Depth Free Product Trials Ubiquitous PDF

Pitstop Pro

Now graphic arts professionals have even broader and more expert control over their PDF documents. With...

Download free demo

ARTS PDF Aerialist

The ultimate plug-in for Adobe Acrobat and #1 selling product at PDF Store. Advanced splitting, merging,...

Download free demo

Cool Tool: PDF to ePub Converter 2.0

ePub Converter 2.0 is a PDF file conversion program for converting PDF, HTML, XML, TEXT, GIF, and JPEG files into ePub file format.

March 04, 2010
Search Planet PDF
more searching options...







Download PDF Creator

PDF Resources
Platinum Sponsor
Create & Edit PDF - Nitro PDF Software

ARTS PDF

Silver Sponsors

PDF-Tools QuickPDF: The Unrivaled PDF Developer Toolkit

Get Nitro PDF Professional
Featured Product

NITRO PDF Professional

Built from the ground up, the perfect desktop PDF product for business and enterprise. Nitro PDF Professional has an uncompromising feature set so you can create, combine, edit, collaborate on and...

Featured Event

No upcoming events

PDF Store Categories