0

I am building a static website, and I have images in my index page each image has a title name, how do I make an image clicked to open in a different window if clicked, I have a template page designed to be used for opening an image in a different window if clicked but I don`t know how to configure everything. Secondly, I would want the image to be placed in a particular section in the template page.

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by samsnov
0

This could be achieved with php on the template page, and using a URL like my_script.php?file=img.png&t=my%20image.

I will provide an example.

<HTML>
<head>
<title>Gallery : <?php echo $_GET['t']; ?></title>
</head>
<body><div align="center">
<table>
<tr><td><b><?php echo $_GET['t']; ?></b></td></tr>
<tr><td><img src="images/<?php echo $_GET['file']; ?>" /></td</tr>
</table></div>
</body>
</HTML>

sorry about any wiered caps, used iOS to publish this.
This code obviously requires some added security, and you can open the window with JavaScript.

0

Thank you very much Mathew this served me very well, I wasn`t arround to reply this post on time I am sorry for thst

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.