Variables with url
I made an image gallery. Now they want the gallery to be able to start on any of the pictures in the gallery. Here comes more of the problem, the gallery is in frames and the images are in an array. Here is the url: http://www.arttrak.com/gallery/
How can i write a variable to the url (which pops up the window) then read that variable into the array to make the picture and description change?
The trouble with doing something right the first time is that nobody appreciates how difficult it was.
Rageforth posted this at 15:58 — 25th October 2000.
They have: 56 posts
Joined: Feb 2000
I got it figured out. What ui did was write the variable to the url (such as 'page.html?variable') then i put in this javascript:
<script>
if (location.search.length > 0){
string = location.search.substring(1,location.search.length);
i = string.substring(0,string.length);
}
else {
i = "1";
}
</script>
it works just fine in ie and ns. i'll try to remember to post the url later on so you can see it working
The trouble with doing something right the first time is that nobody appreciates how difficult it was.
Rageforth posted this at 22:20 — 25th October 2000.
They have: 56 posts
Joined: Feb 2000
Turns out I wasn't going the gallery for that site anyway. Oh well. Here is the working site. Go to
http://www.peacockbassfishing.com/test/gallery/
and click on any of the pictures. Take the source if you like it. I don't mind
The trouble with doing something right the first time is that nobody appreciates how difficult it was.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.