Grendor
Jun 2nd 2005, 9:02 am
I want to make very simple page where I have two buttons(previous and next) and when I click on them the pictures change(forward and backward).
Shouldn't it be something like this:
<head>
function next() {
if (document.slideform.slide[current+1]) {
document.images.show.src = document.changer.slide[current+1].value;
document.changer.slide.selectedIndex = ++current;
}
function previous() {
if (current-1 >= 0) {
document.images.show.src = document.slideform.slide[current-1].value;
document.changer.slide.selectedIndex = --current;
</head>
<body>
<form name=changer>
<tr>
<td align=center bgcolor="#C0C0C0">
<input type=button onClick="previous();" value="<<" title="Previous">
<input type=button onClick="next();" value=">>" title="Next">
</td>
</tr>
</body>
Perhaps somebody has allready finished script to do this?
Shouldn't it be something like this:
<head>
function next() {
if (document.slideform.slide[current+1]) {
document.images.show.src = document.changer.slide[current+1].value;
document.changer.slide.selectedIndex = ++current;
}
function previous() {
if (current-1 >= 0) {
document.images.show.src = document.slideform.slide[current-1].value;
document.changer.slide.selectedIndex = --current;
</head>
<body>
<form name=changer>
<tr>
<td align=center bgcolor="#C0C0C0">
<input type=button onClick="previous();" value="<<" title="Previous">
<input type=button onClick="next();" value=">>" title="Next">
</td>
</tr>
</body>
Perhaps somebody has allready finished script to do this?