This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Apr 19, 2011, 4:06 PM
35 Posts
topic has been resolvedResolved

Show/Hide Custom Controls

  • Category: Dojo and Client Side JavaScript
  • Platform: All
  • Release: 8.5.2
  • Role:
  • Tags:
  • Replies: 2
I need to set a flag or session variable to show/hide custom controls in my Xpage.  What is the best way to do this client side via a button in my custom contol?... without saving of course. :) 
 
 
Apr 20, 2011, 7:07 AM
29 Posts
Re: Show/Hide Custom Controls
I do the following for the client side to hide the control:
 
onClick event CSJS: 
 
var clientID='#{javascript:getClientId("YOURCONTROLNAME")}';
if (document.getElementById(
clientID
).style.display=="none")

{
document.getElementById(
clientID
).style.display="block";

}
else{
document.getElementById(
clientID
).style.display="none";

};
 
And don't forget to 
- set "escape=true" so that the getClientId gets computed.
- set "do not submit" option 
May 3, 2011, 1:27 PM
35 Posts
Re: Show/Hide Custom Controls
Thanks! I'll give it a try. 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal