Link to home
Start Free TrialLog in
Avatar of Jiggens
Jiggens

asked on

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
Avatar of Phatzer
Phatzer
Flag of United Kingdom of Great Britain and Northern Ireland image

Not quite sure I understand your question
Avatar of Jiggens
Jiggens

ASKER

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.

ASKER CERTIFIED SOLUTION
Avatar of Phatzer
Phatzer
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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>';