Forum Moderators: open
page1.html
page2.html
page3.html
page4.html
page5.html
page6.html
-all pages must be in same folder with same name (except ending number)
-(must end in single digit [1-9].html)
- set "max_pages" to total number of pages in collection.
Hope this helps -- feel free to tinker with it to get more if you want. Happy help if you have any questions.
<html>
<head>
<title></title>
<script>
var max_pages = 6;
var url = window.location.href;
var url2 =(url.substring(0,url.length-6));
var page =(url.substring(url.length,url.length-6)).substring(0,1);
var prevpage =(page*1)-1;
var nextpage =(page*1)+1;
var link = 'href';
</script></head>
<body><script>
document.write('this is page'+page+'<p> ');
</script><script>
// this is the page navigation
if (prevpage < 1) {
link = 'name';
}
document.write('<a '+link+'="'+url2+prevpage+'.html">previous page</a> ');
for (i=1;i<max_pages+1;i++) {
link = 'href';
if (i==page){
link = 'name';
}
document.write('¦ <a '+link+'="'+url2+(i)+'.html">'+i+'</a> ');
}
document.write('¦ <a '+link+'="'+url2+nextpage+'.html">next page</a> ');
</script>
</body>
</html>