<%@ language = "JavaScript" %>
<% /*
     $Revision$
     $Id$

    File:        prodsearch2.asp
    Description: Toont zoekveld als widget en opent voor resultaat een nieuw tabblad (met zoekveld).
    Parameters:  s: zoekstring
    Context:     Te gebruiken als widget in portal.
    Requires:
    Note:
*/ %>
<!--#include file="../Shared/common.inc" -->
<!-- #include file="../Shared/iface.inc" -->
<%
FCLTHeader.Requires({ plugins: ["jQuery"] })
%>
<html>
  <head>
<% FCLTHeader.Generate() %>
<%
var filter = {  s:            { val: getQParam("s",""),       lcl: L("lcl_search") } };
%>
    <script>
      function showSearchResult() {
          var v_url = "appl/fac/prodsearch.asp?s=" + escape($("#searchText").val()); // encodeURIComponent is logischer maar maakt vna café utf-8
          FcltMgr.openDetail(v_url);
      }

      $(_ => {
        $(".searchIcon").on("click", showSearchResult);
      })
    </script>
  </head>
  <body id="listbody">
    <form id="srch" onsubmit="showSearchResult(); return false;">
      <div class="container fclt-container-md">
        <div class="row justify-content-center">
          <div class="col-md-6">
            <div class="search-container">
              <input type="text" id="searchText" class="form-control search-input" value="<%=safe.htmlattr(filter.s.val)%>" placeholder="<%=safe.htmlattr(L('lcl_srch_placeholder'))%>">
              <span class="default-clickable-icon searchIcon">
                <%=I("fa-search search-icon fa-lg")%>
              </span>
            </div>
          </div>
        </div>
      </div>
    </form>
  </body>
</html>
<% ASPPAGE_END(); %>
