7.0.3 Search Enter Key Bug
- William_firefold
- Commander (CMDR)
- Posts: 186
- Joined: Fri Aug 01, 2008 8:38 am
7.0.3 Search Enter Key Bug
We are getting a strange problem with the keyword box on the search page. We have fixed most of the enter key bugs on the other pages on the site, but this one is being stubborn.
When you enter the keyword and hit enter, it defaults to the search box at the top of the page. When we remove the top search box, it defaults to the reset button in the editor panel at the bottom.
How can I force it to default to the left sidebar?
If you have an idea, please help, as I am out of them.
When you enter the keyword and hit enter, it defaults to the search box at the top of the page. When we remove the top search box, it defaults to the reset button in the editor panel at the bottom.
How can I force it to default to the left sidebar?
If you have an idea, please help, as I am out of them.
Re: 7.0.3 Search Enter Key Bug
If you wrap the left column search box in an asp:Panel and set DefaultButton="Control ID of Search Button", then ASP.NET will take care of mapping the enter key to the correct search button. For example,
Code: Select all
<asp:Panel id="searchwrap" runat="server" DefaultButton="SearchButton">
... search fields ...
<asp:Button id="SearchButton" runat="server" />
</asp:Panel>
- William_firefold
- Commander (CMDR)
- Posts: 186
- Joined: Fri Aug 01, 2008 8:38 am
Re: 7.0.3 Search Enter Key Bug
Thanks for the quick reply, but this was the old solution that I already tried which did not work here.
I wrapped everything and it still defaulted to the top box. Here is the complete .ascx file that we are using. you will see that the box already has a default button set.
I wrapped everything and it still defaulted to the top box. Here is the complete .ascx file that we are using. you will see that the box already has a default button set.
Code: Select all
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CategorySearchSidebar.ascx.cs" Inherits="ConLib_CategorySearchSidebar" %>
<%--
<conlib>
<summary>An ajax enabled search bar that displays products in a grid format. Allows customers to narrow and expand by category, manufacturer, and keyword in a search style interface. This search bar must be used in conjunction with the Category Grid content scriptlet.</summary>
</conlib>
--%>
<%@ Register Assembly="CommerceBuilder.Web" Namespace="CommerceBuilder.Web.UI.WebControls" TagPrefix="cb" %>
<ajax:UpdatePanel ID="SearchFilterAjaxPanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="customSidebar">
<div class="header"><h2><asp:Localize ID="SearchFilterHeader" runat="server" Text="Product Finder"></asp:Localize></h2></div>
<div class="searchArea">
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="KeywordButton">
<asp:Panel ID="NarrowByKeywordPanel" runat="server">
<h3 class="searchCriteria">Narrow by Keyword</h3>
<div align="center">
<asp:TextBox ID="KeywordField" runat="server" Width="120px" MaxLength="60" EnableViewState="false" ValidationGroup="SearchSideBar"></asp:TextBox>
<asp:LinkButton ID="KeywordButton" runat="server" SkinID="Button" Text="GO" EnableViewState="false" ValidationGroup="SearchSideBar"/>
<asp:RequiredFieldValidator ID="KeywordRequired" runat="server" ControlToValidate="KeywordField" Text="*" ErrorMessage="Keyword is required." ValidationGroup="SearchSideBar" Display="none"></asp:RequiredFieldValidator>
<cb:SearchKeywordValidator ID="KeywordValidator" runat="server" ControlToValidate="KeywordField" Text="*" ErrorMessage="Search keyword must be at least {0} characters in length excluding spaces and wildcards." ValidationGroup="SearchSideBar" Display="none"></cb:SearchKeywordValidator>
</div>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="SearchSideBar" />
</asp:Panel>
</asp:Panel>
</div>
<div class="searchArea">
<asp:Panel ID="ExpandResultPanel" runat="server">
<h3 class="searchCriteria">Expand Your Result</h3>
<asp:Repeater ID="ExpandCategoryLinks" runat="server" OnItemDataBound="ExpandCategoryLinks_ItemDataBound" EnableViewState="false">
<ItemTemplate></ItemTemplate>
</asp:Repeater>
<div class="removeKeyword">
<asp:LinkButton ID="ExpandManufacturerLink" runat="server" Text="" Visible="false" Cssclass="searchCriteria" EnableViewState="false"></asp:LinkButton>
<asp:LinkButton ID="ExpandKeywordLink" runat="server" Text="" Visible="false" Cssclass="searchCriteria" EnableViewState="false"></asp:LinkButton>
</div>
</asp:Panel>
</div>
<div class="searchArea">
<asp:Panel ID="NarrowByCategoryPanel" runat="server">
<h3 class="searchCriteria">Narrow by Category</h3>
<asp:DataList ID="NarrowByCategoryLinks" runat="server" DataKeyField="CategoryId" OnItemDataBound="NarrowByCategoryLinks_ItemDataBound" EnableViewState="false">
<ItemTemplate></ItemTemplate>
</asp:DataList>
</asp:Panel>
</div>
<div class="searchArea">
<asp:Panel ID="NarrowByManufacturerPanel" runat="server">
<h3 class="searchCriteria" >Narrow by Manufacturer</h3>
<asp:DataList ID="ManufacturerList" runat="server" DataKeyField="ManufacturerId" OnItemDataBound="ManufacturerList_ItemDataBound" EnableViewState="false">
<ItemTemplate></ItemTemplate>
</asp:DataList>
<asp:LinkButton ID="ShowAllManufacturers" runat="server" Text="See All »" CssClass="showAll" EnableViewState="false"></asp:LinkButton>
</asp:Panel>
</div>
<asp:HiddenField ID="VS" runat="server" />
</div>
</ContentTemplate>
</ajax:UpdatePanel>
- William_firefold
- Commander (CMDR)
- Posts: 186
- Joined: Fri Aug 01, 2008 8:38 am
Re: 7.0.3 Search Enter Key Bug
I just tested in IE, and the keyword box works as normal in IE7 but fails in Firefox. Could this be a problem with the implementation of ASP, or maybe form specifications in firefox?
Re: 7.0.3 Search Enter Key Bug
I was just going to ask if it worked in IE and not in FireFox. See,
http://kpumuk.info/asp-net/using-panel- ... n-asp-net/
http://kpumuk.info/asp-net/using-panel- ... n-asp-net/
Re: 7.0.3 Search Enter Key Bug
I am having the problem in IE8 on my site.
Re: 7.0.3 Search Enter Key Bug
Is this search and the enter key a bug on my site or with able? http://67.225.187.60/
Re: 7.0.3 Search Enter Key Bug
Any help greatly appreciated for the following...
If a user logs in by typing in the email and password, then subsequently hitting the enter key, everything is fine on IE 8, Firefox, and Chrome.
However, if a user requests a password reset, AC7 will generate the new password assistance page. After the user types in the password twice on this page and hits the enter key, the enter key is defaulting to the top of the search box. This error happens on IE8, Firefox, and Chrome. Is this a bug? Thanks.
If a user logs in by typing in the email and password, then subsequently hitting the enter key, everything is fine on IE 8, Firefox, and Chrome.
However, if a user requests a password reset, AC7 will generate the new password assistance page. After the user types in the password twice on this page and hits the enter key, the enter key is defaulting to the top of the search box. This error happens on IE8, Firefox, and Chrome. Is this a bug? Thanks.
Re: 7.0.3 Search Enter Key Bug
I have logged this issue hereDBounlom wrote:Any help greatly appreciated for the following...
If a user logs in by typing in the email and password, then subsequently hitting the enter key, everything is fine on IE 8, Firefox, and Chrome.
However, if a user requests a password reset, AC7 will generate the new password assistance page. After the user types in the password twice on this page and hits the enter key, the enter key is defaulting to the top of the search box. This error happens on IE8, Firefox, and Chrome. Is this a bug? Thanks.
http://bugs.ablecommerce.com/show_bug.cgi?id=8493
For a quick fix you need to edit ConLib/MyCredentials.ascx file and set container asp panel default button to SaveButton and then change save button from LinkButton to simple asp button and finally remove its SkinId property.
Like
Code: Select all
<asp:Panel ID="EditPanel" runat="server" DefaultButton="SaveButton">
Code: Select all
<asp:Button ID="SaveButton" runat="server" Text="Save" OnClick="SaveButton_Click" CssClass="button" />
Re: 7.0.3 Search Enter Key Bug
Thanks Mazhar! The fix worked. However, my previous post was referring to the bug on ConLib / PasswordHelpPage.ascx. Regardless, I fixed the bug in MyCredentials.ascx using your updated code, and it works great. I also added that code to PasswordHelpPage.ascx, and it seems to work fine as well. Can you update the bugzilla post to show the bug on the PasswordHelpPage.ascx as well?
Re: 7.0.3 Search Enter Key Bug
Thanks for the feedback, I have updated the bug report.DBounlom wrote:Thanks Mazhar! The fix worked. However, my previous post was referring to the bug on ConLib / PasswordHelpPage.ascx. Regardless, I fixed the bug in MyCredentials.ascx using your updated code, and it works great. I also added that code to PasswordHelpPage.ascx, and it seems to work fine as well. Can you update the bugzilla post to show the bug on the PasswordHelpPage.ascx as well?
Re: 7.0.3 Search Enter Key Bug
I am testing google Chrome, and at some pages when i click enter it will submit a different button then IE would.
Re: 7.0.3 Search Enter Key Bug
Could you please provide the names for those pages and locations which seems to have cross browser issue
Re: 7.0.3 Search Enter Key Bug
Is there a stock Able demo some place to test these?