473,406 Members | 2,369 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Gallery legends

I have a WebPages which displays 20 thumbnails and, on clicking the
thumbnail, that picture is enlarged to a separate box. That all works all
right but try as I may, I am unable to have the legend/description of the
picture with the picture.
Can anybody help please as I have gone to tilt trying for 2 days.
the solution could be in JavaScript or HTML, I already have the array
selection bit working but cannot display the result.

Jul 20 '05 #1
1 1704
I think this is something along the lines of what you are looking for... You
can tweak it for your own purposes. The initArray function initialises the
array containing the location of the images. The script in the body section
writes out the links. The openImg function gets kicked off after you click
on any of the links. It then opens up a page containing a header the img and
a link to close the popup window. You can make this popup page look like
anything you specify. You will need to have a blank.htm file for the popup
function to load into the page initially otherwise you will see a page not
found error before you see the image come up. Just put the following html
into it "<html></html>" so that it takes the minimum length of time to load.

Peter.
___________________________
<html>
<head>
<title></title>
<script type="text/javascript">
var vntImg = new Array();

function initArray() {
for (var t = 0; t <= 9; t++) {
vntImg[t] = "/Windat/540/0" + String(t) + ".jpg";
}
}

function openImg(t) {
var strText = new String();

strText += "<html>\n";
strText += "<head>\n";
strText += "<title>Image " + String(t) + "</title>\n"
strText += "</head>\n\n";
strText += "<body>\n";
strText += "<center>\n";
strText += "<h1>Image " + String(t) + "</h1>\n";
strText += "<img border=\"0\" src=\"" + vntImg[t] + "\"><br>\n\n"
strText += "<a href="javascript:self.close();">Close this window</a>\n";
strText += "</body>\n";
strText += "</html>\n";

var popup = window.open("blank.htm", "popup",
"left=0,top=0,width=1024,height=730");
with (popup.document) {
open();
write(strText);
close();
}
}
</script>

</head>

<body onLoad="initArray();">

<script type="text/javascript">
for (var t = 1; t <= 9; t++) {
with (document) {
write("<a href=\"javascript:openImg(" + String(t) + ");\">Pic " +
String(t) + "</a><br>\n");
}
}
</script>

</body>
</html>
___________________________

"George Steward" <go*****@clara.net> wrote in message
news:10****************@demeter.uk.clara.net...
I have a WebPages which displays 20 thumbnails and, on clicking the
thumbnail, that picture is enlarged to a separate box. That all works all
right but try as I may, I am unable to have the legend/description of the
picture with the picture.
Can anybody help please as I have gone to tilt trying for 2 days.
the solution could be in JavaScript or HTML, I already have the array
selection bit working but cannot display the result.

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Captain Ranger McCoy | last post by:
Hello! Suppose I have ten servers at ten ips: x.x.x.1 x.x.x.2 x.x.x.3 x.x.x.4 and so on Each server hosts 100+ photo galleries, all under a single domain name,
54
by: Max Quordlepleen | last post by:
Apologies for the crossposting, I wasn't sure which of these groups to ask this in. I have been lurking in these groups for a week or so, trying to glean what I need to design a simple, clean...
1
by: Stan Sainte-Rose | last post by:
Hi, I need to set several legends to an bmp Image. The legends must be set all around of the image (each 30 degrees). I really need your help about this topic. The best would be to get a vb...
7
by: Eric Lindsay | last post by:
I would like to do a photo gallery with a liquid layout. I wanted to center a caption below each photo (or above each photo). I can do that easily with tables, but then I don't have a liquid...
1
by: Throw | last post by:
G'day everyone I'm looking for a simple photo gallery script in PHP (or Perl), but not too simple. I have tried several photo gallery scripts in either language and I have found that they are...
11
by: ste | last post by:
Hi there, Further to my recent posts where I've received excellent help from Rik and Jerry, I've ended up with an image gallery on my website that displays images in a table, 3 images per row. ...
2
by: rfox | last post by:
I have a page with a couple of forms on it that have a light background color. The form boxes have legends for the title of each box. All is well with the world until I view the page in IE. In...
11
by: shror | last post by:
hi every body I need help please i have designed an image gallery of about 20 pictures and they are shown in thumb nail views and for viewing the largeer version of the images i have added a...
2
anfetienne
by: anfetienne | last post by:
hi, i've got a flash gallery which i've paid for. Im using swf object to import vars to the gallery....the var being imported is a html address to specify the location of files and folders. The...
0
nomad
by: nomad | last post by:
Hello Everyone. I founded an Flash and xml photo gallery. It works but I took it to another step What I want is to have six different galleries in one Flash file. I figure out how to do that but ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.