I have this button in my website
<input class="large button gray input" id="refrescar" type="submit" value="Confirmar"/>
That I use to refresh the site manually like this:
$('#refrescar').click(function() {
location.reload();
});
It works on almost all the pages of my web except on those that have get parameters like this:
http://mywebsite.com/page.php?id=2
When I click the button in that page it will go to
http://mywebsite.com/page.php
instead.
How can I solve this?
Instead of
type="submit", usetype="button", because I think currently the button submits the form instead of reloading it.