I'm very new to HTML, and I'm using it to put together a website to show off my photographs. What I currently have is a page with thumbnails which, when clicked, just scrolls sown the page to the relevant large picture: I'd like a more elegant solution, and I hope someone can provide it . . .
There will be a single HTML document called pictureframe.html. When a link on the thumbnail page is clicked, I want it to go to pictureframe.html instead of just scrolling down the page, so instead of
<a href="#G">
<img src="picture_08_07_thumbs.JPG"
width="300" height="200" border="5" />
</a>
it will read
<a href="pictureframe.html?image=08_07">
<img src="picture_08_07_thumbs.JPG"
width="300" height="200" border="5" />
</a>
All very easy, I just need to edit the thumbnail page to do this. What I really need to know is, how do I get the value in the query string out of the URL in pictureframe.html, and how do I then insert it into the <img> line? The logic I want is
1. Retrieve the value after "image=" in the query string
2. Concatenate it into a file name - so
- variable xyz holds the value from the query string
- the file name becomes "image" + xyz + '.JPG'
3. use the new file name variable in the <img> line, so if the variable is called "filename", the line says something like
<img src=filename>
In summary,
How do I retrieve that single value into a variable, and
How do I use that variable?
All help and suggestions will be gratefully received!