1
I’m using ajax paging, and every time I click to the next page, the browser goes back to the top because of #
that’s on the href.
<a href="#" onclick="getitens('+(pagina-1)+', '+numitens+')">Página Anterior</a>
Is there any other character for the href
, or some way to undo the action? I thought to add '\\'
, but when I did, the browser sent to the home page.
Have you tried giving one
return false;
at the end of that functiongetitens
?– Sergio
No, what I just tried was to add a href="javascript: void(0)" and href="javascript:;", which until then worked. Should I really wear?
– Cobra
It’s exactly the same, although they differ in type.
– Edilson
Perfect. Now I’ll be creating another question, which is page-related, if you can help. The title will be'Pagination in ajax does not display numbers, just previous/next'. Thanks in advance!
– Cobra
In addition to the answer I marked as duplicate of this one, it is also worth seeing this answer: http://answall.com/a/6634/129
– Sergio
It has already been finished. Anyway, thank you! Tranquil Sergio, I solved minutes before.
– Cobra