Pressing enter key in "search textbox" doesn't cause submitting

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 years ago
I'm very glad to know the new version came out...very excellent!

About the search box in search page (not the box near the logo), it only works if you click on the search button, but pressing enter key doesn't cause anything. Please fix it.

Thank you.
14 years ago
Even, my customer thinks that he couldn't find the product he need (in fact it exists in my store), then he left my shop without any hope to come back to find it again.

I think this should be called "bug" and need to be fixed, can you please add it to codeplex issue tracker? Regards!
14 years ago
Can you provide more information please. You need to provide details of what your customer searched on and what products you expected them to find - before declaring this as a bug
14 years ago
He means a 'feature' like this:


<head>
<SCRIPT LANGUAGE="JavaScript">
function navigate(e) {    
if(event.keyCode == 13)  //enter pressed  
    doSend();
  }
  
document.onkeypress=navigate;
</SCRIPT>
</head>

<input type="text" name="search" id="search" size="90" onChange="doSend();" />


14 years ago
Hi,

I had the same problem too, and I also test this issue in demo store.
This is what I tested:

I typed Sneaker or Blackberry in both of the search box(under the logo and in the search page). When I hit enter it did not return anything.  But when I click the Search Button, it then returns the products that was stored in there. Any idea why this happened? Any fixes so that pressing Enter will also returns the same search results as clicking the Search Button?

Thanks
14 years ago
This can be resolved (in v1.11) by updating the Modules\Search.ascx files with the following code.


<div class="searchInput">
        <table width="100%">
            <tbody>
                <tr>
                    <td colspan="2">
                        <asp:TextBox runat="server" ID="txtSearchTerm" Width="100%" SkinID="SearchText"
                            ontextchanged="btnSearch_Click"></asp:TextBox>                                            
                    </td>
                </tr>


I found a similar issue with the searchbox on the main page. I resolved this by updating the Modules\SearchBox.ascx file with a dummy textbox as per the following code.


<ul>
    <li>
        <asp:TextBox ID="txtSearchTerms" runat="server" SkinID="SearchBoxText" />&nbsp;
        <asp:TextBox ID="TextBox1" runat="server" style="visibility:hidden;display:none;" />
    </li>
    <li>
        <asp:Button runat="server" ID="btnSearch" OnClick="btnSearch_Click" Text="Search"
            SkinID="SearchBoxButton" />
    </li>    
</ul>
14 years ago
Hi All,

This is an issue throughout the store. If you enter someting into the search text box, it is instinctive to just hit enter (as with Google and most search fucntions on other sites). However, when you press enter nothing happens, you need to click the button to trigger the event.

Easy fix for Modules\Search.ascx, is that same control used by the search box on the default page?

Regards,
Andrew
14 years ago
Ya, I feel your pain Andrew!

The Modules\SearchBox.ascx is the control used by the search box on the default page. The fix for that is above in bold (the dummy textbox).
14 years ago
What about v1.2, will those codes work as well?
14 years ago
I added those changes to the 1.20 files and the Search box now works when you press the enter key, but not when searching product descriptions from the Search page.

If I select a word I know is contained within the product description and enter it with the 'Search in Product Descriptions' checkbox enabled, it will not return any entries unless I click on the Search button itself.

UPDATE: This works fine in the brief description, but not the full product description.

Regards,
Andrew
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.