Skip to main content
Rstreet
Inspiring
Apr 17, 2019 10:48 PM UTC
Answered

Display.Hidden not working?

Hello -

I am hoping someone might be able to tell me why the below does not work? Basically, I am trying to hide a button; using another button. From the research I have found, it seems the below should work...but it doesn't...nothing happens? 😞

Anyone have any ideas as to what may be preventing the below from working:

Button name: Attach

this.getField("Attach").display = display.hidden;

Thanks in advance for your time

This topic is closed to new replies. Start a new post to keep the conversation going.
Rstreet
RstreetCorrect answer
Inspiring
Apr 18, 2019 12:26 AM UTC

Never mind...I found it...just removed the "this." and all is well

Final working result:

getField("Attach").display = display.hidden;

Thank you

10 replies

Rstreet
RstreetAuthorCorrect answer
Inspiring
Apr 18, 2019 12:26 AM UTC

Never mind...I found it...just removed the "this." and all is well

Final working result:

getField("Attach").display = display.hidden;

Thank you

Translate
try67
Community Expert
Community Expert
Apr 18, 2019 7:55 AM UTC

That should not matter. From what context did you run this code?

Translate
Rstreet
RstreetAuthor
Inspiring
Apr 18, 2019 7:33 PM UTC

Hi Try67 -

Yes, I would not have thought that would have mattered; but apparently with buttons it does. It works fine on text box fields with the "this." included; but not buttons for whatever reason? When I removed the "this." it worked on the button(s).

I was using this in the Action control, Mouse Up, Run Java Script

Translate