title: Flask - Send POST request to specific section in the same page
body: <p>I'm building a simple web site using <code>flask</code>, witch contain one page html <code>index.html</code>, and sections : <code>search</code>, <code>about</code>, <code>contact</code>. This sections are not displayed until the user enter to them </p>
  
  <p>I want to send a <code>POST request</code> from <code>index.html/#search</code> to the same section : <code>index.html/#search</code>.</p>
  
  <p>I tried to send it like that :</p>
  
  <pre><code>@app.route('/search', methods=['POST'])
  def Search():
      _text = request.form['text']
      return render_template('index.html/#search', result=_text)
  </code></pre>
  
  <p>but that didn't work, and I get this error :</p>
  
  <blockquote>
    <p>jinja2.exceptions.TemplateNotFound: index.html/#search</p>
  </blockquote>
  
  <p>I tried to pass <code>search</code> as parameter :</p>
  
  <pre><code>@app.route('/search', methods=['POST'])
  def Search():
      _text = request.form['text']
      return render_template('index.html', id="search", result=_text)
  </code></pre>
  
  <p>but when I run it didn't works because it takes me  to <code>http://127.0.0.1:5000/search</code> (witch displayed the <code>index.html</code> page) while I want to go to <code>http://127.0.0.1:5000/#search</code>.</p>
  
  <p>This is my <em>index.html</em> page:</p>
  
  <pre><code>&lt;article id="search"&gt;
     &lt;h2 class="major"&gt;search&lt;/h2&gt;
     &lt;form method="post" action="Search"&gt;
         &lt;label for="text"&gt;Text&lt;/label&gt;
         &lt;input type="text" name="text" id="text" placeholder="write any thing in your mind :p" required/&gt;
         &lt;input name="search" type="submit" value="See Polarity" class="special" /&gt;
         &lt;input type="reset" value="Reset" /&gt;
     &lt;/form&gt;
  
     &lt;!-- result search --&gt;
     {% if result : %}
         &lt;p&gt;{{ result }}&lt;/p&gt;
     {% endif %}
  &lt;/article&gt;
  </code></pre>