Search without leaving or refreshing page
Here is some example code that should probably help you get things set up. The relevant part is the line {% if query|length and query.search %}, where you’d test if there’s a query string at all and additionally if the search param is set (you can leave out that part if you want).

{% set query = craft.request.getQuery() %}

&lt;form action=""&gt;
    {% set value = query.search is defined ? query.search : '' %}
    &lt;input type="search" id="search" name="search" value="{{ value }}" autocomplete="off"&gt;
    &lt;label for="search"&gt;Search&lt;/label&gt;

    &lt;input type="submit" value="Search"&gt;
&lt;/form&gt;

{% if query|length and query.search %}
    {% set entries = craft.entries.search(query.search) %}

    &lt;aside&gt;
        &lt;h3&gt;Search Results&lt;/h3&gt;

        {% if entries|length %}
            &lt;ul&gt;
                {% for entry in entries %}
                    &lt;li&gt;{{ entry.title }}&lt;/li&gt;
                {% endfor %}
            &lt;/ul&gt;
        {% else %}
            &lt;p&gt;No results.&lt;/p&gt;
        {% endif %}
    &lt;/aside&gt;
{% endif %}