Dropdown List

Avatar

Avatar
Validate 1
Level 1
cclay53
Level 1

Likes

0 likes

Total Posts

18 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
cclay53
Level 1

Likes

0 likes

Total Posts

18 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
cclay53
Level 1

16-01-2012

I have dropdown list that contains 8 items. The values are obviously 1-8 and refer to subforms.

In code I have

if (this.rawValue ==(1) {

     BaggerSub.presence="visible";

}

elseif

     if (this.rawValue == "2"){

     BaggerSub.presence = "visible";

     ZipperSub.presence = "visible";

endif

The problem is if I select item 1 on the list nothing happens. If Iselect item 2, then the script for item 1 works. If I select item 3 thenthe script for item 2 works.

I have the scripts in change.

Any suggestions of where I went wrong.

Thanks

Craig

Replies

Avatar

Avatar
Validate 1
Level 1
cclay53
Level 1

Likes

0 likes

Total Posts

18 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
cclay53
Level 1

Likes

0 likes

Total Posts

18 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
cclay53
Level 1

16-01-2012

Ok new information.

If i choose an item and then choose it again it will load properly.

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

16-01-2012

Hi,

I think you're using the change:Event for your script.

In this case, the rawValue is not available, as it is set as very last.

Use xfa.event.newText instead.

Avatar

Avatar
Validate 1
Level 1
cclay53
Level 1

Likes

0 likes

Total Posts

18 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
cclay53
Level 1

Likes

0 likes

Total Posts

18 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
cclay53
Level 1

17-01-2012

ok. That doesn't seem o work. But what i did do is move my script from a change event to exit and it works-

Thank you.

Craig