Skip to main content
Inspiring
September 8, 2020
Answered

focus/blur

  • September 8, 2020
  • 1 reply
  • 2109 views

On buton field I use focus/blur to show/hide text field1, on my field2 I set up code if field1 is visible ,field2 show some text, but "on focus" doesn't count field1 as visible. Is there way to fix that?

This topic has been closed for replies.
Correct answer try67

I do use mouse enter/exit you can see it in button field action tab.


But you're not using a script... Use this code:

 

// Mouse Enter

this.getField("Text2").display = display.visible;
this.getField("Text3").value = "Text";

 

// Mouse Exit

this.getField("Text2").display = display.hidden;
this.getField("Text3").value = "";

1 reply

ls_rbls
Community Expert
Community Expert
September 8, 2020

Share your script, where are you running it from?

blazbAuthor
Inspiring
September 8, 2020

Hi, just to correct mistake, it's not on focus/blur it's on Mouse enter/exit.

I use code in field2 as custom calculation script, it works if I change code to hidden but it doesn't work for visible.

var a = this.getField("Text2");
if (a.display = display.visible){
event.value = "text";}
else event.value = "";

try67
Community Expert
Community Expert
September 8, 2020

Change:

if (a.display = display.visible){

To:

if (a.display == display.visible){