/    Sign up×
Community /Pin to ProfileBookmark

Image Filename Display Script

G’day

I need a script where, everytime I click on the “Next Image” button in my photo gallery, the filename of the thumbnail photo (e.g. “01.jpg”) displays below or above the image itself.

I can then create a list to the left of the gallery (starting from 01.jpg, 02.jpg, 03.jpg etc) which will lin kto the same filenames but in a separate folder of FULL SIZE images and people can save the full size images by right clicking on them or opening them in a new window (I can add target=”_blank” command to ensure they open in a new window to avoid constand clicking of the “Back” button).

What would the script for this be?

My page is [URL=http://benavery.co.uk/phototest.html]here[/URL] but you will need to ignore the end 2 buttons as I think they will need to be removed.

BA

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@ray326Jan 20.2004 — You could put a little "caption" div under the image and set its innerHTML to the file name.

#caption { text-align: center; }

<div id="caption">image name goes here</div>

In the onclick handler,

document.getElementById("caption").innerHTML = "whatever.jpg"
×

Success!

Help @benavery spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...