Hello,
I'm trying to have a button on the Master Page do different things according to which part of the form the user is on.
if (xfa.host.currentPage = "1" ) {
do x;
}
else {do something y;
}
It doesn't seem to work. It always does x. I suspect that since it's really 1 long page (flowed subforms) it's treating all instances as currentPage = "1".
Can I reference the current subform instead of page?
Is this even possible or do I need multiple Master Pages?
Also, I've been looking at the xfa.layout DOM examples online. That's not in my version of LiveCycle as an option. Very strange....
Solved! Go to Solution.
Views
Replies
Total Likes
Ok , it was just a dumb error. When I tested it setting presence, I found out that the next ok button was responding. Meaning that I should have remembered that currentpages start off with 0, not 1.
Correct syntax:
if (xfa.host.currentPage =="0" ) {
this.presence = "invisible";
}
else {this.presence = "visible";
}
Views
Replies
Total Likes
I see a syntax error in your code..
It is supposed to be double equal sign.
if (xfa.host.currentPage == "1" ) {
Thanks
Srini
I made the change Srini, but that currentPage script still doesn't work.
Here's the syntax now (just for testing):
<Ok button Click event>
if (xfa.host.currentPage =="1" ) {
this.presence = "invisible";
}
else {this.presence = "visible";
}
Views
Replies
Total Likes
Ok , it was just a dumb error. When I tested it setting presence, I found out that the next ok button was responding. Meaning that I should have remembered that currentpages start off with 0, not 1.
Correct syntax:
if (xfa.host.currentPage =="0" ) {
this.presence = "invisible";
}
else {this.presence = "visible";
}
Views
Replies
Total Likes