Calling a JS fucntion on a button click refreshes the page
<p>I have a ASP page which has a JS function that is being called on a HTML input button click, but every time on the button click the page is reloaded and goes back to the initial state.</p>

<p>I have disabled caching both on server and client side, using these tags</p>

<pre><code>&lt;%
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
%&gt;
</code></pre>

<p>and </p>

<pre><code>&lt;meta http-equiv="Expires" CONTENT="0"/&gt;
&lt;meta http-equiv="Cache-Control" CONTENT="no-cache"/&gt;
&lt;meta http-equiv="Pragma" CONTENT="no-cache"/&gt;   
</code></pre>

<p>I tried to figure out what is the problem which is causing the page to refresh on a button click, rather than calling a JS function, but no dice. </p>

<hr>

<p>As asked for here is the button code</p>

<pre><code>   &lt;button class="textinput" id ="reloadData" onclick="reloadData()" title="Reload Data"&gt;Refresh&lt;/button&gt;
</code></pre>

<p>and the function called</p>

<pre><code>            function reloadData() {
            var DPS = document.getElementById("datepickerStart").value;
            var DPE = document.getElementById("datepickerEnd").value;

            var startDP = new Date(DPS);
            var endDP = new Date(DPE);

            var startDate = (startDP.format("isoDateTime")).replace(/:/g, '\\:');
            var endDate = (endDP.format("isoDateTime")).replace(/:/g, '\\:');

            layer.redraw();
            }
</code></pre>

<p>I don't think this has to do something with the function called because it is just readjusting the values in the filter.</p>
