Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Script Objects

Avatar

Avatar
Level 5
_jerome_dinnat_
Level 5

Likes

0 likes

Total Posts

180 posts

Correct Reply

0 solutions
View profile

Avatar
Level 5
_jerome_dinnat_
Level 5

Likes

0 likes

Total Posts

180 posts

Correct Reply

0 solutions
View profile
_jerome_dinnat_
Level 5

27-06-2008

Hi,



I create scripts Objects for a form and it works.

I create scripts Objects for an other one and it doesn't work, however it is the same Objects.



In my subform I click on Insert Script Object and rename it "format". I create two functions :



function test(){

xfa.host.messageBox("hello");

}



and



function minMajLogin(tfield){ //(Met les deux premières lettres du login en majuscules et le reste en minuscules)

xfa.host.messageBox("hop");

var chaine;

var majuscule;

chaine = tfield.rawValue.toLowerCase();

majuscule = chaine.substr(0,2);

majuscule = majuscule.toUpperCase();

chaine = chaine.substr(2,chaine.length);

tfield.rawValue = chaine;

}



I call them with : format.test(); and format.minMajLogin(this);



My form is a dynamic pdf form, the language is javascript and it runs at client.



Can you help me ?



Thank You

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

30-06-2008

I copied and pasted your functions and they work for me. If you are runing acrobat you can hit the Ctrl-J key to show a javascript console and see if there is an error generated.



If you post your email address I can email back the working example I created.

Avatar

Avatar
Level 5
_jerome_dinnat_
Level 5

Likes

0 likes

Total Posts

180 posts

Correct Reply

0 solutions
View profile

Avatar
Level 5
_jerome_dinnat_
Level 5

Likes

0 likes

Total Posts

180 posts

Correct Reply

0 solutions
View profile
_jerome_dinnat_
Level 5

30-06-2008

Yes, I use this script in an other form and it works and I do the same things for this form so I don't understand why it doesn't work 😞



My email address : jdinnat@gmail.com



Thank you for your help.

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

01-07-2008

Then it would be better if you emailed the form that does not work to me at livecycle8@gmail.com.



I will not be able to look at it until next week, but I will report back to you as soon as I do.