More in this section
Forums / Developing with Sitefinity / Trigger SearchWidget search from another set of controls

Trigger SearchWidget search from another set of controls

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Raymond
    Raymond avatar
    1 posts
    13 Mar 2014
    11 Jun 2014
    Link to this post

    I'm trying to trigger the Search Widget from another set of controls I'm using for the mobile version of my Sitefinity site. I've been able to use jQuery to copy the value from the mobile textbox to the Search Widget's text box. But I'm having trouble triggering the submit button in the Search Widget.

    This is what the search widget looks like

    div id="m_nav_primary_ctl00">
        <fieldset id="m_nav_primary_ctl00_ctl00_ctl00_main" class="sfsearchBox">
        <input name="ctl00$m_nav_primary$ctl00$ctl00$ctl00$searchTextBox" type="text" id="m_nav_primary_ctl00_ctl00_ctl00_searchTextBox" class="sfsearchTxt">
        <input type="submit" name="ctl00$m_nav_primary$ctl00$ctl00$ctl00$searchButton" value="Search" onclick="return false;" id="m_nav_primary_ctl00_ctl00_ctl00_searchButton" class="sfsearchSubmit">

    This is what the mobile controls look like<div class="base"> 

    <div class="sfContentBlock"><
    input type="text" id="searchbox" name="search" size="40">
    <div class="base">
    <div class="sfContentBlock">
    <a href="#" id="search_btn">
    <img style="border-width: 0px; border-style: solid;" id="btn_search" src="/image/button_search.jpg" alt="Search">

    This is what my javascript looks like

    jQuery(function ()
        jQuery('#search_btn').click(function ()

  2. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    06 Sep 2017
    16 Jun 2014
    Link to this post
    Hi Raymond,

    Please check if the returned value of the search button is not an array. If so you could try to click() the button by:

    Svetoslav Manchev
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
2 posts, 0 answered