Link to home
Start Free TrialLog in
Avatar of zachvaldez
zachvaldezFlag for United States of America

asked on

Show specific section of the page.

After selecting the submit button,
Id like the page to display the lower part of page,meaning force it to scroll to the area so that the user can view the grid where the info he entered are listed instead of displaying the upper portion of the page.
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zachvaldez

ASKER

OK, I added this to the page

 MaintainScrollPositionOnPostback="true" which works fine ;however

I have a button that I click for initiating another data entry.
Id like it to jump in the 'Last Name' textbox but it does not go there using the code

Txtlastname.focus.  I think it is because of the line I added in the page directive.

Any suggestion to fix this. Thanks for the link. I'll check it out.

put this in your page :

<script>
window.onload = function() {
       setTimeout(function() { document.getElementById("<%= Txtlastname.ClientID %>").focus(); }, 500);
}
</script>
OK , I could not follow the anchor tutorial, thanks
so Im posting the  part of the HTML code . where will the anchor go?
<tr>
            <td bgcolor="#FFFFCC" class="style20" colspan="2">
                &nbsp;
            </td>
            <td align="left" class="style21" bgcolor="#FFFFCC" colspan="6">
                <asp:Label ID="Label44" runat="server" Font-Bold="True">Person Information</asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style20" colspan="2">
                <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Size="Small">Last Name:</asp:Label>
            </td>
            <td align="left" class="style21" colspan="6">
                <%--  <asp:Label ID="Label7" runat="server" Width="296px"></asp:Label>--%>
                <asp:TextBox ID="TextBox12" runat="server" Width="381px" CssClass="cap" Onkeypress="return lettersOnly(event)"
                    Font-Names="Microsoft Sans Serif" BorderStyle="None" Font-Size="Small"></asp:TextBox>
               
            </td>
            <td style="border-style: none; border-color: #FFFFFF; font-style: italic; font-weight: normal;
                color: #FF0000;" align="left" class="style11">
                <asp:Label ID="Label88" runat="server" Font-Bold="True" Font-Size="Larger" Text="*"></asp:Label>
            </td>
        </tr>
how will I use the script that you made. which part of the source Ill add it.
>how will I use the script that you made.
put it in your page

>which part of the source Ill add it.
all
at the Person Information
>>>>window.onload = function() {
       setTimeout(function() { document.getElementById("<%= Txtlastname.ClientID %>").focus(); }, 500);
}

I dont think this would work because every postback it goes to focus on the txtlastname field.

What probably would work is the anchor then focus to the field
when the button 'Add another member"
whats the ? all about??
here's the button

 <asp:LinkButton ID="LinkButton3" runat="server">Add Another Person?</asp:LinkButton>

wish lis that teh page would move lower so the txtbox would be in focus
Thanks