Hi Roshawn,
The simplest way is to make sure that a control on the page has the focus
after the page is loaded. In the sample below, I give the textbox a tabindex
and in the codebehind, I emit the Javascript to cause the textbox to have
the focus.
Let us know if this helps?
Ken
Microsoft MVP [ASP.NET]
Toronto
<form id="Form1" method="post" runat="server">
<p>
<asp:textbox TabIndex="0" id="TextBox1"
runat="server"></asp:textbox></p>
<p>
<asp:button id="Button1" runat="server"
Text="Button"></asp:button></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>
<asp:hyperlink id="HyperLink1"
runat="server">HyperLink</asp:hyperlink></p>
</form>
Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Page.RegisterStartupScript("startup", _
"<script>TextBox1.focus();</script>")
End Sub
"Roshawn Dawson" <ud****@bellsouth.net> wrote in message
news:uh**************@tk2msftngp13.phx.gbl...
Hi,
Could someone tell how to force a mouse event using either jscript or
javascript? I simply want to allow users to scroll the page after
postbacks using the scroll button on either a mouse or the keyboard
without them having to click the page first.
Thx,
Roshawn