onselect - Text Select Script
Activates an event handler when existing text in a control is selected.
Category
eventsSyntax
<xp:eventHandler event="onselect" attributes>content</xp:eventHandler>
Usage
For detailed event handler syntax, see eventHandler - Event Handler (property).Examples
This input box has a client handler for theonselect
event. The client handler displays
a message if the user selects the default value (or any existing text)
in the input box.<xp:inputText id="inputText2" defaultValue="Default value">
<xp:eventHandler event="onselect" submit="false">
<xp:this.script>
<![CDATA[window.alert("It may not be a good idea to change this value.")]]>
</xp:this.script>
</xp:eventHandler>
</xp:inputText>