cuetext for WebTextArea

Hi Guys,

Is there a way to create a custom properties to put CUETEXT on some control like WebTextArea?

Sub Shown() Handles Shown dim cuetext as String = "Hello, world !" self.ExecuteJavaScript("document.getElementById('"+me.ControlID+"').getElementsByTagName('textarea')[0].placeholder='"+cuetext+"'") End Sub

Wohohow!!!

so that was it!

Thanks Michel it works!

You’re welcome.

Of course it works. I tested it before posting …

:slight_smile:

Hi Michel,

I tried it to use on WebPopupMenu but It show me an error.

[quote]
dim cuetext as String = “Hello, world !”
self.ExecuteJavaScript(“document.getElementById(’”+me.ControlID+"’).getElementsByTagName(‘popmenu’)[0].placeholder=’"+cuetext+"’")
[/quote]

What the wrong here?

Also, how did you know the STRING version of specific controls that you use in getElementsByTagName?

The code I posted is specific to WebTextArea. I won’t work for a WebPopupMenu.

BTW the underlying control for WebPopupMenu does not have cueText, because that is not a control where you enter text. Why would you want to put a cue text there ? Just set the value !

As for the exact HTML name of the underlying control, I look for it in the browser with the developers tools.

Hi Michel,

I use WebPopupMenu as COMBOBOX. I want the user to be informed that he need to select item from the list. So I want to put “REQUIRED” as cuetext.

Now I know!

Thanks MIchel!