• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 273
  • Last Modified:

php img link

I am getting this to show up as a  image, where i want it to be a link than click on it pop in another window. I keep trying but no matter what i do its shows the image.

$window = "'http://homes.pacificscene.com/popup.php?type=maps&ID=" . $row[0] . "','popUp','width=825,height=625,scrollbars=yes'";
                        if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/images/browse/maps/" . $ID . ".jpg")) {
                            print '<p><a href="javascript:;"><img border="0" src="http://homes.pacificscene.com/images/browse/maps/' . $row[0] . '.jpg" onclick="MM_openBrWindow(' . $window . ')" />View Map</a></p>';
                        }

checking link out    http://homes.pacificscene.com/browse/community.php?ID=9
0
Jiggens
Asked:
Jiggens
  • 3
1 Solution
 
PhatzerCommented:
Not quite sure I understand your question
0
 
JiggensAuthor Commented:
when i remove the img tag the link pops up with 404 error

http://homes.pacificscene.com/browse/javascript%20onclick=


I cant get it to pop the file but the location is there and file is there.

0
 
PhatzerCommented:
Have you tried placing the    onclick="MM_openBrWindow(' . $window . ')"     inside the <a... tag? At the moment, the image is given the popup link, not the actual hyperlink.
0
 
PhatzerCommented:
So, you'd need to change:

print '<p><a href="javascript:;"><img border="0" src="http://homes.pacificscene.com/images/browse/maps/' . $row[0] . '.jpg" onclick="MM_openBrWindow(' . $window . ')" />View Map</a></p>';

To:

print '<p><a href="#" onclick="MM_openBrWindow(' . $window . ')"><img border="0" src="http://homes.pacificscene.com/images/browse/maps/' . $row[0] . '.jpg"  />View Map</a></p>';
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now