title: How to add jstree search plugin inside a HTML form
body: <p>I have the jstree search plugin working fine inside a HTML page. The data for the tree is loaded with ajax, and the search is permformed with ajax.</p>
  
  <p>Everything works fine until I put it in another form.</p>
  
  <p>If I put the same code inside a HTML form it doesn't work anymore because the search is not performed.</p>
  
  <p>The search is not performed because the whole form is submitted when I click the search button of the plugin.</p>
  
  <p>How do I catch the click on the search button and prevent the whole form to be submitted ?</p>
  
  <p>The global form has its own submit button and it still works fine.</p>
  
  <p>I tried the solution in this thread but it doesn't work :
  <a href="http://groups.google.com/group/jstree/browse_thread/thread/7945aa59fca2d9c9" rel="nofollow">http://groups.google.com/group/jstree/browse_thread/thread/7945aa59fca2d9c9</a></p>
  
  <p>Also this does not work :</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form id="list" name="list" action="save.php" method="post"&gt;
  
      &lt;!-- jstree button and input text for search plugin --&gt;
      &lt;div id="mmenu"&gt;
          &lt;input type="submit" id="search" value="Go" /&gt;
          &lt;input type="text" id="text" value=""  /&gt;
      &lt;/div&gt;
  
      &lt;!-- the tree container --&gt;
      &lt;div id="indexation" class="indexation"&gt;&lt;/div&gt;
  
      &lt;input id="url" type="text" name="url" value="" size="30" title="www.example.org"/&gt;
  
      &lt;input type="submit" name="sendform" value="Save" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>&lt;script type="text/javascript"&gt;
  // Code for the menu buttons
       $(document).ready(function(){
  
      $("#mmenu input").click(function () {
          switch(this.id) {
              case "add_default":
              case "add_folder":
                  $("#indexation").jstree("create", null, "last", {
              "attr" : {
              "rel" : this.id.toString().replace("add_", "") }
                  });
                  break;
              case "search":
                  $("#indexation").jstree("search", document.getElementById("text").value);
                  break;
              case "text": break;
              default:
                  $("#indexation").jstree(this.id);
              break;
          }
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Any idea/tip would be greatly appreciated</p>
  
  <p><strong>Here is the jsfiddle</strong> :</p>
  
  <p><a href="http://jsfiddle.net/v9VRr/6/" rel="nofollow">http://jsfiddle.net/v9VRr/6/</a></p>
  
  <p>thank you,</p>