Expand my Community achievements bar.

SOLVED

how make to know when the attachment file display its visible or hidden

Avatar

Level 2

Hi guys,

sorry for my english.

In my scenario I have two button for open or close the attachment file display with the script 'app.execMenuItem("ShowHideFileAttachment");'.

But i don't know when the attachment file display its visible or hidden or detect when the user clicks on show/hidden in the display.

Anybody knows?

Thanks in advance.

ZAMPAZAMPA.

1 Accepted Solution

Avatar

Correct answer by
Level 10

You can do this the following way:

var obj = this.viewState.toSource().split(",");

if (obj[1].replace("overViewMode:","") == 7) {

    //Your code here...

}

View solution in original post

4 Replies

Avatar

Level 10

Hi,

you can use another method to show or hide the attachment pane.

Here's an example.

http://thelivecycle.blogspot.de/2010/04/xfa-form-control-view-settings.html

Avatar

Level 2

Thanks radzmar,

You help me a lot, but how i make to ask to pdf is it panel of attachment its open?

I make this:

 

event.target.viewState == {overViewMode:7}

but return false all the time when panel of attachment its open and when its close.

ZAMPAZAMPA.

Avatar

Correct answer by
Level 10

You can do this the following way:

var obj = this.viewState.toSource().split(",");

if (obj[1].replace("overViewMode:","") == 7) {

    //Your code here...

}

Avatar

Level 2

Thanks radzmar!! run perfectly!!

ZAMPAZAMPA