SharePoint 2013 multiple search boxes on a single page

How can I have multiple independent search boxes on a single SharePoint 2013 page?  My scenario is this:
1. Search Box 1 is added to the master page
2. Search Box 2 is on a dedicated search page along with a search results web part.
Search Box 1 is the search box from the navigation section in the Snippets Gallery.  It is the smaller SharePoint search box.
Search Box 2 is a search web part added to a web part zone on the page.  It is also the large SharePoint search box.  
When on the dedicated search page, and a search term is entered into search box 2, the search term is "entered" in both search boxes.  The real issue, which totally breaks the experience, is that the same CSS is applied to both search boxes
on the page.  So the smaller search box, search box 1, gets the CSS class ".ms-srch-sbLarge" dynamically applied to it.  Additionally, we noticed that the divs wrapping the search boxes both get the ID of "SearchBox1".  I
have added a before and after image to illustrate the problem.  
5/9/2013 - 
I have some more information to add to this issue.  SearchBox2 is using a display template. The control_searchbox.js file associated with the display template correctly gets SearchBox2's control ID when the page is first rendered.  However, when
a search term is entered in SearchBox2, rather than preserve the control ID it found on page load, control_searchbox.js  parses the DOM for a TemplateType of "control" and a TargetControlType of "searchbox".  It finds the first
one it comes to, which is the one in the master page and overwrites SearchBox1 with it's own markup, which is targeted for SearchBox2.
Microsoft - this would seem to be a bug in SharePoint.  How can we get a fix for this?

So what you can also do is set the searchBoxScriptWebpart directly in the masterpage with pointer to a displaytemplate. This way you have more control. In the RenderTemplateId attribute you can point to the same displaytemplate or create your own copy with
customizations.
<SearchWC:SearchBoxScriptWebPart RenderTemplateId="~sitecollection/_catalogs/masterpage/Display Templates/Search/Control_SearchBox_Compact.js" ID="SearchBoxScriptWebPart1" DefaultDropdownNodeId="1001" UseSiteCollectionSettings="false" EmitStyleReference="false" ShowQuerySuggestions="true" ChromeType="None" UseSharedSettings="true" TryInplaceQuery="false" ServerInitialRender="false" runat="server" __WebPartId="{2243C4B0-F63F-4573-B39E-3A60BA773508}" />
This worked for me. :)
This eventually worked for me too.
I was referencing this webpart from my master page but experienced issues on the search results page as described above. When I set the RenderTemplateId property, it would work some of the time and other times I would get a display error from the webpart
in my master page.
I had to make sure that ServerInitialRender was set to
false. @adilbouhouch already has it set properly in the markup above. I missed it initially and just wanted to point it out in case anyone else gets the same issue.

Similar Messages

  • Sharepoint 2013 Server Search Not Working, URGENT!!

    Hi thr,
    im a current sharepoint 2013 server user and im facing a severe problem with sharepoint now, i cannot search using the search bar 
    And the Search Service Application keeps giving me this error, 'The search service is not able to connect to the machine that hosts the administration component. Verify that the administration component in search application ‘Search Service Application’
    is in a good state and try again. '
    I have tried every possible way including creating new search service application, restarting the services , everything i had already tried but its still not working and keep giving me errors
    Anyone can help me? its very urgent here, thanks

    Can you check out the patch status of the servers? If you've got auto-update on the servers and something for SharePoint has been downloaded and installed, it might need to be configured still. Either the PS Config (as suggested below) or the Set-up wizard
    will take care of this
    Additionally, the TechNet Wiki has something that might help you out
    http://social.technet.microsoft.com/wiki/contents/articles/22838.sharepoint-2013-the-search-service-is-not-able-to-connect-to-the-machine-that-hosts-the-administration-component.aspx
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • Crawl log error in sharepoint 2013 for search services

    Dear Support,
    please find below mention crawl log error in sharepoint 2013 for search services.
    8,597 The server is unavailable and could not be accessed. The server is probably disconnected from the network. 
    423 This item could not be crawled because the repository did not respond within the specified timeout period. Try to crawl the repository at a later time, or increase the timeout value on the Proxy and Timeout page in search administration. You might also
    want to crawl this repository during off-peak usage times. 
    59 Processing this item failed because of a timeout when parsing its contents. 
    11 The filtering process has been terminated 
    4 SharePoint returned an empty response. 
    3 The crawler could not communicate with the server. Check that the server is available and that the firewall access is configured correctly. 
    2 The crawler could not communicate with the server. Check that the server is available and that the firewall access is configured correctly. If the repository was temporarily unavailable, an incremental crawl will fix this error. 
    would request your support for resolving this type of issue

    1. Are you able to browse the sites on SP server. server is unavailable means that application pool
    of that site is down. Check application pool on all server. if you start any application pool. make sure it does not stop few minutes later. you need to update password if it does stop
    2. Create a disable loopbackcheck of registry on all servers
    http://blogs.technet.com/b/sharepoint_foxhole/archive/2010/06/21/disableloopbackcheck-lets-do-it-the-right-way.aspx
    http://support.microsoft.com/kb/926642/en-us
    3. Create a new search service application and check if you face same issue.
    4. I assume you have change some password or other setting when you started facing this issue. what changes were made in environment
    If this helped you resolve your issue, please mark it Answered

  • Search box, adv.search box in a landing page

    hi,
    as per my reqmnt, i need to have 3 web applns,  
    1)one is a DMS solution
    2) extranet - for my customers partner's web appln 
    3) community web appln
    i am confused abt the landing page, how to design the search func. if i give a search box on the master page , which content need to pulled out.
    also if i am going with this search box, i have to implement advanced search box also. but i am not able to find a particular zone on this landing page.
    can i remove this search box altogether since i need to have a  separate ent.search center site collec in the DMS,community web appln., why should i put a  search box on this landing page. 
    [ i  can decide this - as client didnt say anything specific abt this reqmnt].
    can anyone give me an idea, abt the sample landing page contents of a portal which has multiple web applns.
    and how it looks like :i any test sample site / web aplns are available ? 
    any public facing sites samples are also welcome, which is built on sp 2013 or prev.version.  
    highly appreciate the help!
    Das

    hi,
    as per my reqmnt, i need to have 3 web applns,  
    1)one is a DMS solution
    2) extranet - for my customers partner's web appln 
    3) community web appln
    i am confused abt the landing page, how to design the search func. if i give a search box on the master page , which content need to pulled out.
    also if i am going with this search box, i have to implement advanced search box also. but i am not able to find a particular zone on this landing page.
    can i remove this search box altogether since i need to have a  separate ent.search center site collec in the DMS,community web appln., why should i put a  search box on this landing page. 
    [ i  can decide this - as client didnt say anything specific abt this reqmnt].
    can anyone give me an idea, abt the sample landing page contents of a portal which has multiple web applns.
    and how it looks like :i any test sample site / web aplns are available ? 
    any public facing sites samples are also welcome, which is built on sp 2013 or prev.version.  
    highly appreciate the help!
    Das

  • How do you print multiple different images on a single page in preview

    How do you print multiple different images on a single page in preview?

    Chances are no one who saw your question knew the answer.
    Unless you're willing to share the answer you found here, then anyone else like you searching for the problem who comes across this thread will also be unable to thank you for providing the answer too.  

  • Since installing the latest FF version 14.0.1 the search boxes on the home page don't work with google

    The normal google page works fine, but the search boxes on the home page (below firefox logo and the one top RH corner) just go nowhere unless you change the search provider using the dropdown, to yahoo or bing etc, in whcih case it searches fine - just won't work with google, which I prefer to use. I have an older version 3.6.13 on another desktop and that still works fine.
    Any ideas team?

    golden-grace, to answer some of your questions:
    * Firefox 3.6 is no longer supported and will no longer be updated for security vulnerabilities or any other updates.
    *On resetting '''browser.startup.homepage_override.mstone''': It's normal for the "welcome to Firefox" tab to open and for that preference to revert back to user-set and show Firefox 14.0.1 afterwards.
    *On deleting the chromeappsstore.sqlite file in the Firefox Profile Folder and then resetting that preference again: You can open the Profile folder from the Firefox Help -> Troubleshooting Information page. See the [[Profiles]] article for more information.
    * On installing new search engines from http://mycroft.mozdev.org that simply adds new search providers to the [[Search Bar|Search Bar]]. It does not install a new search bar. You will still have a single Search Bar and the "normal" Google will still be listed.
    Getting back to Google not working from the about:home homepage or from the upper right corner search box, you said,
    ''the page tab changes to "connecting" and the little circle starts revolving, just as though it is looking for the page as normal and at the bottom of the home page the message appears "waiting for www.google.com"''. You also said in your original post that, ''The normal google page works fine.'' Which normal google page is that?
    If you can go to www.google.com directly, and it works fine:
    I would try removing Google from the list of search providers and then use the "Restore Defaults" button in the Search Bar "Manage Search Engine List" dialog to add it back to the list, then select it again as your default. The [[Search Bar|Search Bar]] article explains in detail how to do that. (Alternately, try the [https://addons.mozilla.org/firefox/addon/searchreset/ Search Reset] add-on. This should also add back Google and set it as the default.)
    If you try going to www.google.com but it never connects, that's a whole other issue. Putting that aside for now, if you would rather use google.co.uk from the Search Bar, you can install it <u>as an additional choice from the Search Bar drop-down menu</u>, by going here:
    * http://mycroft.mozdev.org/google-search-plugins.html ... where it's listed as '''''Google UK - the Web (google.co.uk) by Mycroft Project'''''. (You will still have a single Search Bar and the "normal" Google will still be listed.)
    If you try going to www.google.com but it never connects, you could troubleshoot that by following the [[Basic Troubleshooting]] article (I would start with clearing cookies and cache) but all of these steps may be frustrating for you. Another option is to simply reset Firefox (which saves your bookmarks, passwords, and some other essential data) to see if that resolves the problem. You can do that from the Firefox Help -> [https://support.mozilla.org/en-US/kb/provide-detailed-information-for-firfox-issues#w_accessing-the-troubleshooting-information-page Troubleshooting Information page]. For details, read the [[Reset Firefox – easily fix most problems]] article. You can then go to http://mycroft.mozdev.org/google-search-plugins.html and select your preferred Google search engine to use from the Search Bar.

  • Multiple file links in a single page: A better way to/efficient way to handle ?

    Aloha Everyone!
    I would like to ask the community how they have handled multiple file links in a single page. Sort of a pseudo database of files.
    Here is the webpage I have been working on:http://huichawaii.org/
    Here is what I have done to show files so far:
    old version:http://huichawaii.org/proceedings---2012-education%2c-math---engineering-technology.html
    new version: http://huichawaii.org/ahs2013-proceedings.html
    The website works best in Chrom or Firefox, still have to convert the flash header to an edge animate .
    Mahalo in advance for everyone's input!

    Depending on what other text you might have, you could use the data list component.
    To get the text to have underlines, you will need to edit the repeated item. You can also adjust colors and fonts as well. The default rollover and selected states will probably not be the UI that want, so make sure you change those as well.
    Now for the interactivity, select the datalist, and use the interactions panel, choose "On Select", then "Go To Url", the trick is to make sure the "When a specific item is selected" is also set. Here are the basic settings to get your links working:
    Add new interactions for each item you want to be functional.

  • SharePoint 2013 site coll's created. Home page not displaying for any site collection in farm

    SharePoint 2013 site coll's created. Home page not displaying. Same issue for all site coll's in the farm. Done the basic checks. Any Ideas?

    Hi lakshita,
    Would you please check whether you can go to the page:
    http://siteurl/_layouts/settings.aspx page:
    http://siteurl/default.aspx page? If so, go to Site Features in site settings page, reactivate the Wiki Page home page feature, check the result.
    If not, please check whether there is related information in ULS log and event viewer log file? Does the page shows page not found or other errors? Check whether the site can be opened in other machine?
    Thanks,
    Qiao Wei
    TechNet Community Support

  • How to remove the option "Search This Site" from search box on customized Master Page in SP 2013

    Hi Everyone,
    I want to remove the option "This Site" from search box on Master page. I have searched this forum and found tips. I have added the
    <Property Name="DropDownModeEx">ShowDD_NoContextual</Property>
    in the file SearchArea under
    C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\FEATURES\OSearchEnhancedFeature
    But it didn't work. The tips is for SP 2007. Anyone can help me to change this in Sp 2013?
    Thanks.
    <?xml version="1.0" encoding="utf-8" ?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
        <Control
            Id="SmallSearchInputBox"
            Sequence="25"
            ControlClass="Microsoft.SharePoint.Portal.WebControls.SearchBoxEx" ControlAssembly="Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
     <Property Name="GoImageUrl">/_layouts/images/gosearch15.png</Property>
     <Property Name="GoImageUrlRTL">/_layouts/images/gosearchrtl15.png</Property>
     <Property Name="GoImageActiveUrl">/_layouts/images/gosearchhover15.png</Property>
     <Property Name="GoImageActiveUrlRTL">/_layouts/images/gosearchrtlhover15.png</Property>
            <Property Name="UseSiteDefaults">true</Property>
            <Property Name="FrameType">None</Property>
            <Property Name="ShowAdvancedSearch">false</Property>
            <Property Name="DropDownModeEx">HideScopeDD_DefaultContextual</Property>
     <Property Name="DropDownModeEx">ShowDD_NoContextual</Property>
            <Property Name="UseSiteDropDownMode">true</Property>
        </Control>   
    </Elements>
    This is the link I found
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/dc35ccf4-bc94-4827-9f16-83478c8642d1/removing-thissite-from-search-dropdown

    Hi
    Please try this .. add this in your master page and check
    <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
    <script>
    $(document).ready(function() {
    document.getElementById("SearchBox").children[0].children[0].value="Search";
    document.getElementById("SearchBox").children[0].children[0].title="Search";
    </script>
    Manoj Gangwar | Sharepoint 2010 MCPD | Sharepoint 2010 MCTS

  • Sharepoint 2013 bing search results

    I have integrated bing search to my sharepoint 2013. Its returning results but i am facing two issues.
    1) The bing search is always returning only 8 results
    2) I want to get results for only particular website and i have used following query. But its always returning 8 results and first 3 results are website related and rest 5 results are not related to the site. If i use same query in bing site search
    text box its returning results properly. Any idea why the sharepoint bing search is returning results differently?
    query.QueryText =
    "tender|road Site:http://www.kenha.co.ke/";
    Thanks

    Hi - Thank you for your reply. We dont have proxy server and i tried the steps mentioned in your blog now i am getting 10 results. Is there any setting i need to enable to get all the results or sharepoint restricts the results automatically? I
    could have attached screen shot but its not allowing.
    And my second question is how to restrict bing results to one website. The following query param restrics the search to Kenha when i search in bing directly. But when i search from sharepoint its returning mixed results.
    "tender|road Site:http://www.kenha.co.ke/";
    Thank you for help

  • SharePoint 2013 Foundation Search - Change the admin components to the new WFE server

    Hi,
    We tried to move the Search Service Application from one server to another server which was newly joined in the Farm.
    In this case,the Search Service in my App server - which was working earlier also did not work. I tried almost all Powershell scripts to stop the service, and i could not make it.
    Please let me know, how to stop the search service in both servers and to run only in the new server that i have joined.
    Also, we need to move all Search Admin components to the new server, and from then Search Index should work only in the new server and not the old one.
    Kindly let me know the possibility how can this be achieved. 
    Thanks in Advance!

    Hi Karthikanandh,
    If you want to stop the Search service in both servers and only run in the new server, then you can stop the service in Central Administration in both the two servers and start the service in new server.
    Please go to Central Administration > System Settings > Manage service on server > change the server to the one that you need to stop the search service and then stop the search service.
    To move the search admin component to another server, then you need to clone the active Search topology and move that component, and then then activate the topology and move the remaining components.
    http://sharepoint.rackspace.com/sharepoint-2013-search-administration-tutorial
    http://blogs.technet.com/b/pfelatam/archive/2013/05/10/create-a-search-topology-in-sharepoint-2013.aspx
    http://technet.microsoft.com/en-us/library/jj862354.aspx#Search_Comp_Clone
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Image Preview in Sharepoint 2013 Online Search Results

    Hi i am using Sharepoint 2013  online Office 365. In my search page i can view the preview from picture library. But when i am searching document library i can only see the preview of pdf, excel, word etc... not image. Why image file not previewing from
    document library.How to solve this?
    Thanks in advance.

    Hi,
    Please refer links below:
    http://stevemannspath.blogspot.in/2013/02/sharepoint-2013-image-preview-in-search_22.html
    http://blogs.realdolmen.com/experts/2014/03/17/images-in-sharepoint-server-2013-search/
    Hope it helps!
    Thanks,
    Avni Bhatt
    If this helped you resolve your issue, please mark it Answered

  • Sharepoint 2013 custom search results grouping display template

    Hi,
    I am trying to implement custom grouping for search result items. I would like to group them by a managed property, but without using result blocks (query rules). The idea is to sort the results by the property and then compare the current item (ctx.CurrentItem)
    with the previous item using ctx.CurrentItem.ParentTableReference. If a new property value is detected we insert a new 'group header' (just some simple html). The problem is the ParentTableReference is undefined. Shouldn't there be such a property in current
    item object?
    I'm implementing this in a custom search result item display template...
    Thanks in advance.

    Hi,
    According to your post, my understanding is that you want to customize search result items display template.
    I suggest you get enumerate all properties of JavaScript context object and debug you code to watch the
    ctx.CurrentItem object.
    The following articles for your reference:
    Debugging Display Templates in SharePoint 2013 Search
    http://powersearching.wordpress.com/2013/01/25/debugging-display-temlates-in-sharepoint-2013-search/
    Enumerate all properties of JavaScript context object in display templates in SharePoint 2013
    http://sadomovalex.blogspot.co.uk/2013/06/enumerate-all-properties-of-javascript.html
    How to Define a Custom Group Display Template (GroupTemplateId) for the Search Results WebPart via JavaScript
    http://www.eliostruyf.com/how-to-define-a-custom-group-display-template-for-the-search-results-webpart-via-javascript/
    Creating customized search results in SharePoint 2013
    http://www.abelsolutions.com/totm/creating-customized-search-results-in-sharepoint-2013/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Start menu/Search box works one single time after boot and sporadically on seemingly random occasions. Win+D shortcut doesn't work either.

    Hi,
    This issue might be similar to what has already been reported but it feels different.
    I've attempted all solutions in this previous topic: https://social.technet.microsoft.com/Forums/en-US/7fb011ec-e986-4999-8cbf-21dba894432a/start-menu-button-and-search-not-working-in-windows-10-enterprise-technical-preview?forum=WinPreview2014General With
    the exception of rolling back to a previous build (which was working). I'm on 10061.
    I did registry editing, creating a new user, the powershell command (stumbled upon this just before finding the above link and it fixed that problem; the start menu/search box/Win+D bug was happening before the Metro Apps crash).
    A temporary fix exists which requires me to tskill explorer every time I want to use the start menu, the search box or show my deaktop. Not really practical. That will let me use them for a few times but once I click repeateadly on the search box (it is
    really slow), forget it. Not even the "show desktop" rectangle in the bottom right corner works (it doesn't in any other situation except the brief time were the other options are usable.
    Every other single Windows Key keyboard shortcut works.
    I hope enough information was provided but if anything else is needed, I'll do it.
    You know, honestly I wish Microsoft would just either dump the Metro Windows UI or burn the Classic Windows UI because
    still keeping the Control Panel divided and with no way interact with the Metro Apps outside of their environment is just stupid (or I'm not seeing the bigger picture).
    Thanks,
    Luiz.

    I have similar issues with build 10061, after I used System Restore. See also this topic: https://social.technet.microsoft.com/Forums/en-US/d1295cc3-e7c2-40be-a832-c1c648c669c2/system-restore-and-searchstart-menu?forum=WinPreview2014Feedback. 
    Things I have tried so far (but did not solve the problem for me):
    - Install Windows Updates (Suggested by Sharath in
    this topic)
    - Powershell scripts (Suggested by Sharath in
    this topic)
    - Disabling NVIDIA graphics in Device Manager
    - Enabling group policy settings
    - Registry fix (http://www.arunze.in/2015/02/fix-windows-10-start-button.html)
    - The windows-feedback:?contextid=158 command gives a 'The app didn't start' error.
    - Start menu and Search still don't work in contrast mode (Shift+Alt+PrScn)
    - Installing nVidia 347.88 drivers.

  • SharePoint 2013 Enterprise Search and Document ID service

    Hello,
    as I understand search scopes are now deprected in SharePoint 2013 and I cannot add any new custom search scopes.
    My problem is that on the document ID settings page, where I can choose the search scope, I can only see the deafult "All Sites" search scope.
    Is there any way to add custom search scopes in SharePoint 2013, or make my default document ID provider use result sources insted of search scopes?
    Any suggestions would be greatly appreciated!
    Thank you.
    Dimitar

    Hi Dimitar,
    Document IDs help you manage your documents by providing an easy way to track items regardless of their location. Even if a document is moved to another site, renamed or copied, it retains its Document ID. You can use the Document ID to easily locate it.
    Document ID’s are automatically assigned to uploaded documents and this ID will follow the item throughout its whole life cycle. Consequently, Document ID should be unique among all sites, so that it won’t duplicated when documents moved among sites.
    Document ID Lookup Search Scope allows a specific search scope to be used to look up documents using their IDs. The default search scope is “All sites” as you see, it means if you search certain document id, you are searching it among all
    sites. If you would like to custom search scope for it, I’d recommend you create custom result source for it in Search Service Application. Although it is workaround, it might be more flexible and easier to achieve.
    Here are some good articles for build search result sources in SharePoint 2013 for your convenience:
    http://blogs.technet.com/b/tothesharepoint/archive/2012/10/09/build-a-specialized-search-experience-in-minutes-with-sharepoint-2013.aspx
    http://techmikael.blogspot.com/2013/04/limiting-search-results-in-sharepoint.html
    Regards,
    Rebecca Tu
    TechNet Community Support

Maybe you are looking for

  • Error in the logical system (BW - R3 connection)

    Hey guys, i need help, actually i created a connection between BW and R3 system, but i think i wrongly assigned the details to another BW system and now whenever i tried to load the data, it's not being processed. And i checked and it shows me that t

  • Why have I lost the data display on my thumbnails in bridge?

    I had my thumbnails set to display capture info and file name. Everything was working ok until yesterday. Now they are just blank with on info. How can I get them to display the data again?

  • Availibiliy Check

    To All SAP Gurus Please can any one tell me, How to do availibility check configuration? Please mail me at my e-mail address<b> [email protected]</b> Thank You in advance. rgds Aniruddha Godbole

  • Moving to Mac from PC, need to buy everything again ?

    I noticed that in my download list there are only Windows downloads, and I'm moving from pc to mac. Do I need to buy everything again or.. ?? I have Production Suite CS5.5 and Photoshop Lightroom. Thanks

  • HT4009 In-app purchase issue

    I tried to make an in-app purchase on my iphone- the error message I get says For Assistance contact iTunes support. Not sure what to do as I was able to make a purchase yesterday, double checked my account information and checked my settings.