Click to See Complete Forum and Search --> : next/prev page buttons


callwin
08-06-2003, 03:21 PM
I have a window that has a TOC on one side and three frame set on the other sides. When clicking on of the the TOC option, it is to load file into two of the frame set. The third frame set has the next and prev buttons. How can I set up the nex and prev buttons to load the next page or go back to the prev page for each of the TOC options.

Thanks

Cindy

CrazyGaz
08-06-2003, 04:20 PM
<a href="javascript:history.go(-1)">go back</a>
<a href="javascript:history.go(1)">next</a>

do you mean like that?

Gaz.

callwin
08-06-2003, 04:34 PM
I think so. I am fairly new to java script and am not sure how that works. Would the next and prev button call those function?

Thanks

Cindy

Charles
08-06-2003, 04:34 PM
To avoid the embarrassment of broken links for the 13% of users that do not use JavaScript you would do well to draw those links with JavaScript.

<script type="text/javascript">
<!--
document.write('<p id="previous-next"><a href="#">Previous</a> | <a href="#">Next</a></p>')
document.links[document.links.length-2].onclick = function () {history.go(-1); return false}
document.links[document.links.length-1].onclick = function () {history.go(1); return false}
// -->
</script>