PDA

View Full Version : I´m giving away $2million....


acrobatNerd
08-23-2002, 08:09 AM
There, now that I have your attention (I don´t have $2million)
I need help with a script:
I need a javascript for adobe acrobat. I have created form fields in Adobe Acrobat, and you can customize them, using javasripts and validations and such.
I have created a field called "Social security", and in Swedish a social sec. number looks like this: 123456-7890.
Now, I want to be able to write it as:1234567890, and when I hit the tab-button, to move on to the next field, I want it to appear as: 123456-7890.
Did anyone understand that?:confused:

Ben Rowe
08-26-2002, 02:01 AM
Ive got 2million!

I have no idea, what your talking about in this question

delphi_dawg
08-26-2002, 04:42 PM
i can only think of one way to accomplish this...

client side validation

I use two events -

1) onblur
2) onkeyup


The onblur will fire when the user leaves the field
and the onkeyup fires whenever the user presses a key

note : when you use the onkeyup, and the validation is correct - then return a TRUE, or the user will not be able to get out of the field...

there might be a trouble spot -
if the field will allow 11 chars (123456-7890)
then the user could quite possibly enter all 11 numbers - as in 12345678901 and this will throw a curve at cha...


good luck