title: How can I implement and activate search in a Windows 8 app?
body: <p>I want to allow my app to use the Windows 8 search charm and despite going through the extensive search documentation on MSDN I seem to be missing the first step. Firstly, I have already declared that I wish to use search in the Project Manifest, and I have added the code in my header to link my <code>default.html</code>with the <code>searchResults.js file</code>.</p>
  
  <p>The documentation then suggests that using system search should just 'work'. How this does not happen for me, when I do a search it does not open my app on the default, blank search results page. I have tried adding the following to my <code>default.js</code> page, but to no avail:</p>
  
  <pre><code>  // When the user submits a search query
  Windows.ApplicationModel.Search.SearchPane.getForCurrentView().onquerysubmitted =
      // Call the function 
      function (eventObject) {
  
          winJS.log &amp;&amp; WinJS.log("User submitted the search query: " + eventObject.queryText, "sample", "status");
  };
  </code></pre>
  
  <p>What am I missing? How do I get the search charm to actually activate my app and display the results page?</p>
  
  <p>Thanks.</p>