Change Events (Show/Hide Subforms)

Avatar

Avatar

Mancini21

Avatar

Mancini21

Mancini21

16-09-2009

Hi guys i need some help, i have a some subForms that i want to manipulate with a dropdown list, and i've tried to do this with this code in the exit event,

if (this.rawValue ==1) {

xfa.resolveNode("form1.theForm.subForm1").presence= "invisible";

xfa.resolveNode("form1.theForm.subForm2").presence= "visible";
}

else if(this.rawValue ==2) {

xfa.resolveNode("form1.theForm.subForm3").presence= "visible";

xfa.resolveNode("form1.theForm.subForm4").presence= "invisible";

}

This is not working. The subforms are not working. I think that here if(this.rawValue ==1), the number, is the position of the list that i inserted in the drop down list object. Am i correct?

If someone can help i would apreciate.

I am also attaching the file.(I want to do in the dropdown list the same behavior of the checkboxes.)

Thanks.

Regards

Mancini.

Accepted Solutions (0)

Answers (5)

Answers (5)

Avatar

Avatar

xrum

Avatar

xrum

xrum

17-09-2009

open your reader.

Edit - Preferences - javascript (on the left) - Enable Acrobat JavaScript(checkbox)

also make sure you have reader open when you preview your document in LiveCycle to see the errors. sometimes the window does not pop up if the reader is not open

Avatar

Avatar

Mancini21

Avatar

Mancini21

Mancini21

17-09-2009

Hi xrum,

my form is saved as dynamic.

How i turn on the javascript debugger?

Thanks

Avatar

Avatar

xrum

Avatar

xrum

xrum

17-09-2009

1. Is your JavaScript debugger turned on?

2. Is the form saved as dynamic?

Thanks!

-Tanya

Avatar

Avatar

Mancini21

Avatar

Mancini21

Mancini21

17-09-2009

HI,

But when i do this,

if(this.rawValue ==1) {

xfa.resolveNode("form1.theForm.subForm1").presence= "invisible";

xfa.resolveNode("form1.theForm.subForm2").presence= "visible";
}

else if(this.rawValue ==2){

xfa.resolveNode("form1.theForm.subForm3").presence= "visible";

xfa.resolveNode("form1.theForm.subForm4").presence= "invisible";

}

The subform doesn't work like i want.

Any help?

Avatar

Avatar

xrum

Avatar

xrum

xrum

16-09-2009

to see what number refers to which drop down option.

select your drop down, in the properties Binding tab.

check "specify Item values" and you'll see it

good luck