Click to See Complete Forum and Search --> : works one way???


graphicpro
10-10-2003, 11:04 PM
code below works going back - backPics but not going foward - nextPics... what am i missing here?

url is dispa.htm?ID=x where x is 1-15

function drawThePick()
{
PickID = (window.location.search).split("=")[1];
document.writeln('<IMG SRC="art1/a'+PickID+'.jpg">');
}

function backPics()
{
backPic = PickID-1;
if(backPic <1) backPic = 15;
document.writeln('<a href="dispa.htm?ID='+backPic+'" target="_self">');
}

function nextPics()
{
nextPic = PickID+1;
if(nextPic >15) nextPic = 1;
document.writeln('<a href="dispa.htm?ID='+nextPic+'" target="_self">');
}

tnx in advance

Khalid Ali
10-11-2003, 09:11 AM
post a link to the page where you have this implemented.

graphicpro
10-11-2003, 12:23 PM
solved... for reasons i dont get on nextPic, trated not as number in calculation... fixed by

nextPic = parseInt(PickID) + 1;