Hello, I have created one .html page. I have to use pagination in it so that i can avoid scrolling upto last page.and i can move to next page by click on button("Next")
A:
You can create a form like this:
<form action="nextpage.html" method="get">
<input type="submit" value="Next" />
</form>
That will give you a form with a button that redirects the user to the page nextpage.html
jao
2009-10-10 10:06:08
or just use a simple link `<a href="nextpage.htm" title="go to next page">next</a>`
knittl
2009-10-10 10:08:23
Thanks Jao for suggestion
om
2009-10-10 10:17:58
He wanted a button, therefore I suggested a form
jao
2009-10-11 10:12:11
A:
You can do that with PHP. With PHP, you can dynamcally generate HTML pages, in this case with a certain amount of items on it and links to the next and previous page.
eWolf
2009-10-10 10:06:50
OK, you don't have to, you can also manually create an HTML file for each page, but that is pretty complex and unflexible.
eWolf
2009-10-10 10:07:24
And you can do it with python and ruby(onrails) and ... , even ajax can do this. Also one long document with internal links could do the trick.
DaClown
2009-10-10 10:43:07
Yes I know, but PHP is probably the most common and most available language of these (I don't say it's the best!).
eWolf
2009-10-10 10:56:08
I'm just saying your "have to" is simply wrong, PHP is only one possiblity among many other server side script languages. But even SSI can do it, and client side script languages, too.
DaClown
2009-10-10 14:28:15
This solution is good only when you know about amount of pages, while generating HTML, but what if you need paginate after some AJAX request came back?
Artem Barger
2009-10-11 14:01:24
Of course when you do AJAX requests and modify the content with javascript, you re-paginate with javascript. But this is just additional, your website should work without JS, too.
eWolf
2009-10-12 18:11:13
A:
Assuming you are looking for a way to implement pagination, take a look at this jquery plugin. And I believe you will find a tons more plugins across the web.
Artem Barger
2009-10-10 10:08:02