<form method="get" id="myform">
<input type="text" name="name">
<input type="submit" name="search" id="search" value="Поиск"/>
<input type="hidden" name="current_page" id="current_page" value="{current_page}">
</form>
<span id="pagination">
<a href="javascript:void(0)">1</a>
<a href="javascript:void(0)">2</a>
<a href="javascript:void(0)">3</a>
<a href="javascript:void(0)">4</a>
<a href="javascript:void(0)">5</a>
<a href="javascript:void(0)">6</a>
<a href="javascript:void(0)">7</a>
</span>
<script type="text/javascript">
$(document).ready(function () {
$('#pagination a').click(function () {
$("#current_page").val($(this).html());
$("#myform").trigger("submit");
});
});
</script>