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: Not allow hyphen in character 30, 60, 90, 120
Conf: (P-PDF) JavaScript, Msg: 66167
From: lmp
Date: 6/4/2002 12:30 PM

Hi Jon,

Thanks for your help.

Cindy


On 6/2/2002 4:33:39 AM, lmp wrote:
>Hi,
>
>I have write jscript for limit
>hyphen:
>When the users key in any
>letter what they want, but
>when they key in hyphen(-) in
>the 30th of character, 60, 90,
>and 120. The message comming
>up
>
>I put my script in Keystroke
>Custom Script:
>
>//this is not allow the hyphen
>in any position of character
>in the field
>
>var astring= "-"
>for (var i = 0; i
> >
>if(astring.indexOf(event.chang
>e.charAt(i))!=-1) {
>app."NOT ALLOW TO ENTER HYPHEN
>IN CHARACTER 30, 60, 90")
>event.rc = false;
>}
>
>Because the fields have to
>populate to the other fields.
>I try to limit hyphen(-) in
>character 30, 60, 90, 120
>
>this is my new script in
>STROKEKEY CUSTOM SCRIPT:
>
>var
>theString="1234567890qwertyuio
>p[]\asdfghjkl;'/.,mnbvcxz-+=\r
>";
>
>var SecondString="-";
>
>for ( i = 0; i
> >{
>if
>((theString.indexOf(event.chan
>ge.charAt(i))== -1)&&
>((SecondString.indexOf(event.c
>hange.charAt(29))!= -1)||
>(SecondString.indexOf(event.ch
>ange.charAt(59))!= -1) ||
>(SecondString.indexOf(event.ch
>ange.charAt(89))!= -1) ||
>(SecondString.indexOf(event.ch
>ange.charAt(119))!= -1))) {
>//not allow to enter the "-"
>app."not allow to enter the
>hyphen in position 30, 60 , 90
>only.")
> event.rc = false;
>
> }
> }
>}
>
>I don't know what I miss
>something in my script. Why my
>script is not working as my
>expect.
>Thanks in advance.
>
>cindy
>




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

Ubiquitous PDF: 2009 IRS income tax forms available for download

With less than a month to go until Americans will be scrambling to file their 2009 tax paperwork. Luckily, printable PDF versions of forms such as the 1040 can be downloaded for free from the IRS website.

March 18, 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