ラベル disappears の投稿を表示しています。 すべての投稿を表示
ラベル disappears の投稿を表示しています。 すべての投稿を表示

2012年3月24日土曜日

Returning Focus to the top of the page

I have two panels over laying each other. When the user click a button at the bottom of the first panel, that disappears and the panel on top appears, when the event triggers and the Ajax response is processed the page focus remains where the button that was clicked once was and as the information on the second panel is at the top of the page, the user has to scroll up to the top each time. This is obivously something to do with Ajax, but I can't get the page to return to the top. I have tryed using a invisible text box and setting that as having focus when the second panel appears, but this does not work either.

Any suggestions?

I would link internally to the page. So if you're onhttp://www.someurl.com/somepage.aspx after the Ajax, link internally tohttp://www.someurl.com/somepage.aspx# which will jump to the top of the page.

Alternatively you can do a setFocus call to the <body> tag or some other element that is at the top of the page.

Regards,

Tim

2012年3月21日水曜日

RoundedCornersExtender Panel border (right-hand side) disappears when PopupControlExtender

Good Morning,

Trying to solve an annoying problem with the rounded corners extender from ajax control kit for the asp.net 20.0 framework.

When I click on textboxtxt6 (see below), the popup control extender causes txt6_details to appear, but when clicked on, the right-hand side border of theRoundedCornersExtender disappears (top, bottom and left-hand sides of border remain). Has anyone come across this problem before?

Thanks,
webconsult

<cc2:RoundedCornersExtenderID="RoundedCornersExtender1"TargetControlID="Panel1"Radius="10"Corners="All"runat="server"BorderColor="#8f8f8f"/>
<asp:Panelrunat="server"ID="Panel1">
<asp:tablerunat="server"width="100%"border="0"cellspacing="12"id="Table1">
.
.
<asp:UpdatePanelrunat="server"UpdateMode="Conditional"ID="UpdatePanel2">
<ContentTemplate>
<asp:UpdateProgressID="UpdateProgress1"runat="server"AssociatedUpdatePanelID="UpdatePanel2">
<ProgressTemplate>
<tableborder=0><tr><td><imgsrc="images/ajax-loader.gif"alt=""/></td><td><asp:LabelID="Label10"CssClass="bodytext"runat="server"Text="Saving details..."ForeColor="#1C7BB5"></asp:Label></td></tr><tr><tdcolspan="2"> </td></tr></table>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:TextBoxID="txt6"runat="server"></asp:TextBox>
<cc2:PopupControlExtenderID="PopupControlExtender1"TargetControlID="txt6"PopupControlID="txt6_details"OffsetY="25"runat="server">
</cc2:PopupControlExtender>
<cc2:FilteredTextBoxExtenderID="FilteredTextBoxExtender1"runat="server"
TargetControlID="txt6"
FilterType="Custom, Numbers"
ValidChars="-."/>
<asp:TextBoxID="txt6_details"runat="server"CssClass="popupclass"Width="300"OnTextChanged="txt6_details_TextChanged"
MaxLength="500"Rows="5"TextMode="MultiLine"AutoPostBack="true"></asp:TextBox>
<cc2:TextBoxWatermarkExtenderID="TextBoxWatermarkExtender1"runat="server"TargetControlID="txt6_details"WatermarkText="If entering a figure please provide an explanation here..."WatermarkCssClass="watermarkclass">
</cc2:TextBoxWatermarkExtender>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTriggerControlID="txt6_details"EventName="TextChanged"/>
</Triggers>
</asp:UpdatePanel>
.
.
</asp:table>
</asp:panel

For some reason, changing the txt6_details textbox width to 200 seemed to have fixed the problem.