i can do it in aSP but i want to do it in JS. So i will tell you what i want to do, and if any one can give me the code or guide me to do this. What i want is.. On Index.html I have a image. And there are two buttons there. One is for next and one is for prev. When a user click next button the page refresh with the variable (index.html?something) and then the next image from the folder is displayed. All the images in the folder have names like this 1.jpg 2.jpg 3.jpg and so on... so now please tell me how do i do. I am very bad in explaining when it comes to writing..... so please dont mind and just help me. I hope all the js ppl will understand what i actually want. Thank you.
// Grab the image from the URL var url = window.location; var imgVar = url.split("?"); var imgName = imgVar[1]; // Now, set the src of the object to the image document.getElementById("yourImage").src = imgName; Does that answer your question?