I have search form on my page, once you input something, i render the same template, but with the search results outputted as a list to the user. The user can click on the results he likes. If the user likes a result (by clicking on the like button), I want do pass this data back to my route, to do some reprocessing of the results. When the user clicks on a like, how can I pass a variable value from my template to my route without refreshing the whole page? 

```html
<form class="form-container" method="POST" action="">
  <div class="row">
    <div class="col-sm-12 form-group">
      <input type="text" name="input" id="input" autofocus placeholder="Type your query here!" autocomplete="off" />
    </div>
  </div>
  <input type="submit" style="display:none" />
</form>

{% if output %}
{% for result in output %}
<div>
{{result}}
<span type="button" id={{tag_like_btn}}><i style="color: red" class="fas fa-heart"></i></span>
</div>
{% endfor %}
{% endif %}
```

```
@irsystem.route('search', methods=['GET', 'POST'])
def search():
    print ("search")
    form = request.form
    form_submitted = False
    if request.method == 'POST':
        print ("Form submitted...")
        form_submitted = True
        results = [("Article1", 60), ("Article2", 50), ("Article 3", 40)]
        return render_template('search.html', form=form, form_submitted_status=form_submitted, output=results)
    return render_template('search.html', form=form)

```