Forums

This topic is locked

script query

Posted 11 Mar 2004 14:46:58
1
has voted
11 Mar 2004 14:46:58 neil adams posted:

How do i get this script to work? i want it to 'know' the name of a thumbnail thats been clicked and link to a specified folder with the larger image in, that has the same name.

Giving the following parameters what bits would go where in the code.

(web folder)
- Test.html (with thumb 1001.jpg on it)
- Thumbs (folder)
L 1001.jpg
- Previews (folder)
L 1001.jpg

- page name test.html (on this page is thumbnail called "1001.jpg"
- this thumb is in a folder called "thumbs" in the same folder as the page "test.html" thats its on.

the larger picture i want the thumb to link to is in a folder called "previews", the preview picture will have the same name as the thumb, "1001.jpg"

this is code ive got so far what do i need to change to make it work?

what i think i worked out last night-
- leave # where it is
- where the "..." is where the link to the thumb should go.

- where does the link go that says look in the "Previews" folder for the same name as the thumb just clicked on?

<a href="#" onclick="return setHref(this.firstChild.src)"><img src="..." /></a>



do i just paste this code into the html? or do i need to apply it as a behaviour, custom script?

Replies

Replied 12 Mar 2004 18:05:53
12 Mar 2004 18:05:53 Phil Shevlin replied:
Is this all JS or does the image file names come from a DB via php or asp? Can you show some code or an example url?

Reply to this topic