Highlighted

Script Objects

Avatar

Avatar

_jerome_dinnat_

Avatar

_jerome_dinnat_

_jerome_dinnat_

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

Highlighted

Avatar

Avatar

pguerett

Total Posts

(val/1000)?string[".0"]}K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

(val/1000)?string[".0"]}K

Likes

611

Correct Answer

692
pguerett

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.
Highlighted

Avatar

Avatar

_jerome_dinnat_

Avatar

_jerome_dinnat_

_jerome_dinnat_

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.
Highlighted

Avatar

Avatar

pguerett

Total Posts

(val/1000)?string[".0"]}K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

(val/1000)?string[".0"]}K

Likes

611

Correct Answer

692
pguerett

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.