Making a little self-interest site to pass the time and I'm stuck when trying to create a script that will allow 2 individual buttons labeled "Previous" and "Next Page" from doing their respective jobs, which I would assume is obvious.
Could anyone inform me, or direct me to where I may learn to implement such a feature? Also, keep in mind my preface and cut me some slack if you try to explain the function yourself.
Appreciated
Name:
Anonymous2011-06-25 22:00
Scripting? Function?
It's called an anchor element, son.
Name:
Anonymous2011-06-25 22:03
Good stuff, now I know it's proper name
Lack of code is disappointing, however
Name:
Anonymous2011-06-25 22:03
an anchor element
as in <a>
as in a LINK
Why would you want to use javascript just to move between pages?
<script type="text/javascript">
var pNum=0;
var maxPage=100;
function next()
{
pNum++;
if (pNum > maxPage) pNum=0;
document.getElementById("frame").src="page"+pNum+".htm";
{
</script>
Whenever I go past the max number of pages it goes to a 404 instead of cycling back to the start page.