You can achieve this functionality by placing this piece of code
at the bottom of your aspx page:
<script type="text/javascript">
document.getElementById("ob_cbo1Textbox").onclick = function(){cbo1.setText(""); cbo1.setValue("");};
</script>
(replace cbo1 with the ID of your combobox)
This will delete the text inside the combobox when you click inside
the textbox. If you don't make any change and click outside the combobox,
the text will remain empty. If you want the previous text to be
restored if you don't make any change, use this code instead:
<script type="text/javascript">
document.getElementById("ob_cbo1Textbox").onclick = function(){this.value="";};
</script>
| |