Link to home
Start Free TrialLog in
Avatar of uyduruk
uyduruk

asked on

Auto Next Image Link 1.jpg to 9999.jpg

Hi,

I have 1.jpg 2.jpg 3.jpg ....... 9999.jpg different size pictures in a folder. How to make next link for simple navigation ?

Thanks.
Avatar of Onthrax
Onthrax
Flag of Netherlands image

Use a little javascript for example.

something like:

var x;
x = 0;

function ShowNext() {
    x++;
   document.getElementById("IDofElement").src = "/images/" + x + ".jpg"
}

function ShowPrevious() {
     x--;
    document.getElementById("IDofElement").src = "/images/" + x + ".jpg"
 }

<a href="#" Onclick="ShowNext(); return false">Next</a>
<a href="#" Onclick="ShowPrevious(); return false">Previous</a>

If you need any further assistance please let me know..
Avatar of uyduruk
uyduruk

ASKER

I never understandig JS. Would you write me all codes with html tag?

I want like this: http://img87.imageshack.us/img87/9043/simplegallery.gif

This is enough for me.

LoL, Thanks
ASKER CERTIFIED SOLUTION
Avatar of Onthrax
Onthrax
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of uyduruk

ASKER

Thank you very much for simple javascript solution. I hope I have time to learn basic JS ;)