zachvaldez
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
put this in your page :
<script>
window.onload = function() {
setTimeout(function() { document.getElementById("< %= Txtlastname.ClientID %>").focus(); }, 500);
}
</script>
<script>
window.onload = function() {
setTimeout(function() { document.getElementById("<
}
</script>
ASKER
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">
</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:Te xtBox>
</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>
so Im posting the part of the HTML code . where will the anchor go?
<tr>
<td bgcolor="#FFFFCC" class="style20" colspan="2">
</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:Te
</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>
ASKER
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
put it in your page
>which part of the source Ill add it.
all
ASKER
at the Person Information
?
ASKER
>>>>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"
setTimeout(function() { document.getElementById("<
}
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"
ASKER
whats the ? all about??
ASKER
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
<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
ASKER
Thanks
ASKER
MaintainScrollPositionOnPo
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.