You need to call your action like this if you want to navigate to another page,
function callAction() {
window.location = "navigation.do?parameter=showNavigation";
}
else if you want to call the same page (without loading another page), you need to use ajax like this. Here i used jQuery ajax
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script type="text/javascript">
$(document).ready(function() {
$.ajax({
url : "navigation.do?parameter=showNavigation",
type : "POST",
success : function(data) {
alert(data);
}
});
});
</script>
Hope this helps.