PDA

View Full Version : To display a single record and to navigate using next button.


Prath
10-25-2002, 10:01 AM
How can i have a next button and show a single image at a time from the database.

And when the last image is reached,on click of the next button it should display the first image.

raf
10-25-2002, 11:11 AM
I see a few possibilitys, buth asp doesn't seem the ideal way to fix it.
why not include a jave applet like one of these:

http://freewarejava.com/applets/slideimage.shtml

it can be done in asp by giving each page a numer in there name ad keeping track of that number by storing and retrieving it from the session variable. The adress for the next-button, will the direct to the same page as the button is on, and the session variable will be incremented ( session("number")=session("number')+1 ) on top of that pages.

To get the image :

response.write("<img height='80' width='80' src='" &session("number") & ".gif'>")


and the links adress will be something like :

response.write("<br><br><a href='" &session("number") &"'>Back</a>")


doen't have time right now to code and try it. If you would like to go this way, let us know.

whammy
10-27-2002, 10:19 AM
I have a javascript solution here (http://www.solidscripts.com/javascript/pageflip/pageflip.zip) that may work for you with a slight modification... but I'd probably do something in ASP now similar to what raf suggested.

Anyway, here (http://www.solidscripts.com/javascript/pageflip/page0.html)'s a demo of it working.

:)