Allen wrote:
> I have a list box ready to collect information from the users. I
> noticed that; every time the users need to enter something they have
> to use the mouse to set the cursor inside the box. How can I set the
> cursor ready inside the list box so that the users do not have to use
> the mouse very time they want to enter something?
> empNumBox->Text = " ";
<script type="text/javascript">
//<![CDATA[
document.getElementById('<%=yourListBox.ClientId%>').focus();
//]]>
</script>
Or, IIRC, there is now something in the framework to do that too. Oh, 30
seconds later, here's the example from the help:
Protected Sub Page_Load(ByVal sender As Object, _
ByVal e As System.EventArgs)
TextBox1.Focus()
End Sub
(Don't forget to set the tabindex for input elements.)
Andrew
|