Home > Articles > Web Development

Automate the Pagination of Your Web Pages

📄 Contents

  1. Creating Pages from Linear HTML Text
  2. Getting Started
  3. Solution Overview
  4. Test Drive
  • Print
  • + Share This
Ivan Pepelnjak describes how to display paginated pages in the web browser without modifying the actual content on your web server.
Like this article? We recommend

Creating Pages from Linear HTML Text

Jason Cranford Teague’s article "Creating Web Pages for Screen, Print, and Email" presents a wonderful idea: Split the contents of a single web page into multiple screen-sized pages that visitors can jump between without reloading the content from the server. However, the source HTML file has to be split into well-defined pages; the solution presented in the article used DIV tags.

Unfortunately, most of us aren’t lucky enough to be able to enforce such content-structuring rules. Quite often, we’re faced with hundreds of existing web pages that have to be refurbished into a new design or presentation paradigm, and changing all the source content is usually out of question. By using the Document Object Model (DOM) on the client side, however, you can usually restructure the content after it has already been downloaded to the browser. In this article, I’ll show you how to use JavaScript in your browser to transform linearly structured HTML text into pages marked with DIV tags. The result can then be used to create onscreen pagination.

  • + Share This
  • 🔖 Save To Your Account