Expand my Community achievements bar.

Script Objects

Avatar

Former Community Member
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
3 Replies

Avatar

Former Community Member
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

Former Community Member
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

Former Community Member
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.