Hiding Password Control


Recommended Posts

I have placed an EditBox Password control on a page and would like to hide it until it is required, then make it visible for use, and finally hide it after it is used.

I have used the"visible" parameter which makes it visible ok but when hiding it hides the Caption immediately but leaves the box visible until another area on the screen is clicked on. Is this an error?

I see there is a Visible parameter but can find no definition of it. How is that different to the "Visible" parameter? I guess it would contain the name of a variable (or channel) that then controls the visibility but I can't get that to work, and which would take precedence - Visible or strVisible?

Rod.

Link to comment
Share on other sites

Every control has a visible parameter that is 0 or 1 and determines if it is visible. The strVisible is only used for some controls and is an expression that when evaluated determines if the control is visible. This was an old school technique left for backwards compatibility.

As for the edit box still displaying until you click away: that is by design to some extent: if the user is in the middle of editing something (entering their password), you don't really want it to just disappear on them! BTW: you can use the setFocus() function to programmatically set the focus to some other control so you can make the edit control invisible.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.