I have the following code:
\');\" name=\"remove[]\"
To reload the page using javascript you can do:
window.location.href=window.location.href
So to reload after the onclick simply add that to the end of onclick, eg:
onclick="removeCart('<?php echo $product['key']; ?>');window.location.href=window.location.href;"
edit: full code with delay
<a onclick="removeCart('<?php echo $product['key']; ?>');setTimeout('window.location.href=window.location.href', 100)" name="remove[<?php echo $product['key']; ?>]" class="button"><span>Remove</span></a>
you can resubmit the page to itself by triggering the submit of an input field for instance. Assuming that your hyperlink got the id nextLink and you got an input with id submitMe you can do :
$("#nextLink").click(function () {
//setting the url of the action target (your page or controller)
$('#submitMe').attr('action', '/MySection/MyPage.php');
$("#submitMe").submit();
});
First answer is correct, also you could use
window.location.reload();