Weird problem with Static Text Presence


i have if-else statement on pg1 of form controls presence of static text object on page (subform) on change event of drop down list. on "if" part of script, static text hidden. works correctly. however, on "else" part of script, static text should visible , not.

the weird thing created dummy drop down list under static text (called "cbotest"). when add statement "else" part of script make dummy drop down list visible, both scripts work correctly. is, both static text , dummy drop down list visible. remove script making dummy drop down list visible, script making static text visible stops working.

here's not work:

amrepass = xfa.event.newtext;
if (amrepass == "yes")
{
btnrepass.presence = "visible";
pg5.stxtsechidden.presence = "hidden";
}
else
{
btnrepass.presence = "hidden";
pg4.cbonumbcb.rawvalue = null;
pg4.cbonumpi.rawvalue = null;
pg5.stxtsechidden.presence = "visible"; // line not work
}

and here's work:

amrepass = xfa.event.newtext;
if (amrepass == "yes")
{
btnrepass.presence = "visible";
pg5.stxtsechidden.presence = "hidden";
}
else
{
btnrepass.presence = "hidden";
pg4.cbonumbcb.rawvalue = null;
pg4.cbonumpi.rawvalue = null;
pg5.stxtsechidden.presence = "visible"; // line works
pg5.cbotest.presence = "visible; // added line
}

help!

-mark

hi mark,

i tried reproduce problem , not. works me. might want try work-around. instead of toggling visibility of static text object, use read-only field looks static text object , toggle value - i.e. set "" when want disappear. set field's properties visible no background or borders. set default value value have static text object use. on initialize event of field, put this.access = "protected"; doesn't receive focus.

jared


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


adobe

Comments