Document Level Scripts .. Need a simple example!


i've been trying add function form avoid writing same script on & on again & not succeeding :|

i'm trying add app.alert function..

i add script object under subform 'p1' called 'hello'..
in hello, write

function hello1
{
app.alert("hello")
}

you can see hierarchy here:

http://i29.photobucket.com/albums/c271/mashdown45/screen.jpg

in order call hello1 function button, on click event, add following:

form1.p1.variables.hello.hello1();

but getting error

typeerror: form1.p1.variables.hello123 has no properties
1:xfa:form1[0].p1[0].button1[0]:click

(you must thinking: 'obviously'.. cannot figure out!)

thank in advance..

hi chris. created variable named hello in hierarchy , typed in:

function hello1()
{
app.alert("hello")
}

then in click event of button put:

form1.p1.variables.hello.hello1();

i think needed "()" after function name.


More discussions in LiveCycle pre-ES (6.x and 7.x) discussions


adobe

Comments