View Full Version : 1 line of code required

Rocket Boy
11-06-2005, 10:57 PM
Instead of having a link on page 1 which takes you to page 2, and a link on page 2 which takes you to page 3...

Is there a line that I can use which can be same on all of the pages. A link that says choose the next pagename.html in sequence?

Thanks in advance

11-06-2005, 11:59 PM
function next() {
location.href = RegExp.$1 + (parseInt(RegExp.$2,10)+1) + ".html";

As long as your page filenames only have digits immediately before .html, that should probably do the trick.