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



Feb 13, 2013, 9:04 AM
41 Posts
topic has been resolvedResolved

Field hint in a xpage edit box

  • Category: Extension Library
  • Platform: All
  • Release: 8.5.3
  • Role: Developer
  • Tags: Field Hint
  • Replies: 2
Dear Team,
 
I want to use field hint in a edit box just like you see the lotus forum in a right hand side given search field and in the field display Search....  when user type in this field automatic field is blank.
 
I want to use same in my application.
 
http://www-10.lotus.com/ldd/xpagesforum.nsf/byMostRecent.xsp
 
 
Feb 14, 2013, 10:13 AM
16 Posts
Re: Field hint in a xpage edit box
 Hi
 
You can do this using tradition Client side Javascript. I normally use: 
 
<input onfocus="if(this.value==this.defaultValue){this.value=''}" onblur="if(this.value==''){this.value=this.defaultValue};"size="17" value="Enter Search words here"....
 
HTH
 
/John 
Feb 15, 2013, 4:59 PM
50 Posts
Re: Field hint in a xpage edit box
Another, perhaps cleaner option, is to set dojoType on the field to dijit.form.TextBox and add the "placeholder" attribute. This will, of course, necessitate setting the page up to use dojo. This will also open up the possibility of using the trim and ...case attributes and other nifty dojo things.

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