I have a 700 page website paged pg_0001 - pg_0700. And I figure to my knowledge in JavaScript and ASP ( unless you have an easier way ) I want to first read the existing pathname:
Code:
document.write(location.pathname);
Then somehow add +1 ( next page ) to the string or -1 ( previous page )
Code:
function prevLocation() {
document.write(location.pathname);
window.location="pg_0001<%'1%>.asp";
}
function nextLocation() {
document.write(location.pathname);
window.location="pg_0001<%'1%>.asp";
}
Code:
<a href="#" onclick="prevLocation();">Previous Page</a>
<a href="#" onclick="nextLocation();">Next Page</a>