Open photo in new window with other HTML elements

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
voltrader
Forum Contributor
Posts: 223
Joined: Wed Jul 07, 2004 12:44 pm
Location: SF Bay Area

Open photo in new window with other HTML elements

Post by voltrader »

When photo thumbnails are clicked on, I open a new window with a larger window using a standard anchor href
<a href="filename" target="_blank">thumbnail</a>
I would also like to display relevant information for the photo. Is there anyway I can also include other HTML elements in the newly opened page?
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

pass the picture to a new page using get

then on the page do

Code: Select all

<html>
<head>
</head>
<body>
<!-- your HTML stuff here -->
<?php
print $_GET&#1111;'pic_url'];
?>
</body>
</html>
hope this gives you some ideas
User avatar
voltrader
Forum Contributor
Posts: 223
Joined: Wed Jul 07, 2004 12:44 pm
Location: SF Bay Area

Post by voltrader »

Thanks -- was hoping to be able to do it without calling another page, but it looks like I'll have to.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

The only other reasonable way to do it would be to use JavaScript.

You could alway just have a page which echo's a single variable (use heredoc) containing the entire page, passed by session.
thegreatone2176
Forum Contributor
Posts: 102
Joined: Sun Jul 11, 2004 1:27 pm

Post by thegreatone2176 »

you can make a javascript function that opens a window and displays a picture based on the filename parameter passed and in your anchor tags call the function with the filename as the parameter

basicly how yahoo lets you view your address book
Post Reply