Wrap the buttons in the hyperlink.
<div class="cal-head-right">
<a class="prev" href="https://stackoverflow.com/questions/19834650/index.php?month=__prev_month__" onclick="$("#calendar').load('index.php?month=__prev_month__&_r=" + Math.random()); return false;">
<button class="prev">prev</button>
</a>
<button class="head-day">Today</button>
<a class="next" href="index.php?month=__next_month__" onclick="$("#calendar').load('index.php?month=__next_month__&_r=" + Math.random()); return false;">
<button class="next">next</button>
</a>
</div>
solved Php Ajax Html and Javascript usage in code [closed]