...

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

jkd
11-06-2005, 11:59 PM
function next() {
/\/([^\/\d]+)(\d+)\.html$/.exec(location.href);
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum