Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Igor Gontcharov on Aug 10, 2009 21:39
open dhtmlx forum
Combobox default value onclick reset

Hello. I need combobox to display default value. F.e when page loaded i need this text in combobox "Click me to search".
Im doing this with: z.setComboText('Click me to search')

After user clicks combobox with default value i need this to dissapear (like on click z.setComboText('') ) so user can start typing his own search word.

I did not found onClick event to do this. Could you please help me how to solve it?
Answer posted by Alex (support) on Aug 11, 2009 02:32

Hello, 

you can use onOpen event in this case:

combo.attachEvent("onOpen",function(){
   
  if(...){

  combo.setComboText("");...}
})