jiggens Posted August 27, 2007 Share Posted August 27, 2007 My code doesn't seem to want to display the images in the location provided. I get renderings but floorplans are not working, any suggestions in what i am doing wrong? I checked permissions, i made sure the file exists, and thats what my code is suppose to be doing is if it exists than print the file, which i t does <?php print "<h1><img src='http://homes.pacificscene.com/images/browse/logos/" . $row[0] . ".jpg' alt='" . $row[1] . "' /></h1>"; print "<p>" . $row[6]; $linkresult = mysql_query("SELECT * from psh_commlinks where commID = '" . $row[0] . "'"); while ($linkrow = mysql_fetch_row($linkresult)) { print "<br />For more information about " . $linkrow[1]; print ", please visit:<br /><a href='" . $linkrow[2] . "'>" . $linkrow[2] . "</a>."; } print "</p>"; if (file_exists("http://homes.pacificscene.com/browse/features/" . $row[10])) { print "<p><a href='features/" . $row[10] . "' target='_blank'>View Features List</a></p>"; } if (file_exists("http://homes.pacificscene.com/browse/brochures/" . $row[8])) { print "<p><a href='brochures/" . $row[8] . "' target='_blank'>Download PDF brochure</a></p>"; } $query = "SELECT * from psh_siteplans WHERE communityID = '$ID' ORDER BY orderID"; $result = mysql_query($query); while ($row = mysql_fetch_row($result)) { print "<form action=" . $_SERVER['PHP_SELF'] . "?ID=" . $ID . "&siteID=" . $row[0] . " method='POST'>"; print "<table border='0' cellspacing='0' cellpadding='5'><tr>"; $window = "'http://homes.pacificscene.com/popup.php?type=renderings&ID=" . $row[0] . "','popUp','width=775,height=550'"; print "<td width='206' rowspan='8' valign='top'>"; print '<a href="javascript:;"><img border="0" src="http://homes.pacificscene.com/images/browse/renderings/' . $row[0] . '-TH.jpg" onclick="MM_openBrWindow(' . $window . ')" /></a>'; print "</td>"; print "<td width='135'><strong>Model</strong></td>"; print "<td>" . $row[1] . "</td></tr>"; print "<tr><td><strong>Appx Sq. Ft</strong>.</td>"; print "<td>" . $row[2] . "</td></tr>"; print "<tr><td><strong>Stories</strong>.</td>"; print "<td>" . $row[3] . "</td></tr>"; print "<tr><td><strong>Bedrooms</strong>.</td>"; print "<td>" . $row[4] . "</td></tr>"; print "<tr><td><strong>Baths</strong>.</td>"; print "<td>" . $row[5] . "</td></tr>"; print "<tr><td><strong>Garage</strong>.</td>"; print "<td>" . $row[6] . "</td></tr>"; $window = "'http://homes.pacificscene.com/popup.php?type=floorplans&ID=" . $row[0] . "','popUp','width=825,height=625,scrollbars=yes'"; if (file_exists("http://homes.pacificscene.com/images/browse/floorplans/" . $row[0] . ".jpg")) { print '<tr><td><a href="javascript:;" onclick="MM_openBrWindow(' . $window . ')">Floorplan</td></a>'; print "<td> </td></tr>"; } $window = "'http://homes.pacificscene.com/popup.php?type=renderings&ID=" . $row[0] . "','popUp','width=775,height=550'"; if (file_exists("http://homes.pacificscene.com/images/browse/renderings/" . $row[0] . "-TH.jpg")) { print '<tr><td><a href="javascript:;" onclick="MM_openBrWindow(' . $window . ')">Enlarged Rendering </td></a>'; print "<td> </td></tr>"; } print "</table><br />"; } ?> Link to comment https://forums.phpfreaks.com/topic/66894-solved-image-not-displaying/ Share on other sites More sharing options...
frost Posted August 27, 2007 Share Posted August 27, 2007 Can you show me the page that this is working on? Or do a view source and paste the outputted HTML here? Link to comment https://forums.phpfreaks.com/topic/66894-solved-image-not-displaying/#findComment-335375 Share on other sites More sharing options...
jiggens Posted August 27, 2007 Author Share Posted August 27, 2007 This is the main page http://homes.pacificscene.com/browse/community.php?ID=21 Link to comment https://forums.phpfreaks.com/topic/66894-solved-image-not-displaying/#findComment-335389 Share on other sites More sharing options...
jiggens Posted August 27, 2007 Author Share Posted August 27, 2007 <?php $window = "'http://homes.pacificscene.com/popup.php?type=floorplans&ID=" . $row[0] . "','popUp','width=825,height=625,scrollbars=yes'"; if (file_exists("http://homes.pacificscene.com/images/browse/floorplans/" . $row[0] . ".jpg")) { print '<tr><td><a href="javascript:;" onclick="MM_openBrWindow(' . $window . ')">Floorplan</td></a>'; print "<td> </td></tr>"; ?> This piece of code is what i am having the must trouble with. Renderings work correctly, but the floorplans aren't. Link to comment https://forums.phpfreaks.com/topic/66894-solved-image-not-displaying/#findComment-335393 Share on other sites More sharing options...
frost Posted August 27, 2007 Share Posted August 27, 2007 From the source: <a href="javascript:;"> <img border="0" src="http://homes.pacificscene.com/images/browse/renderings/33-TH.jpg" onclick="MM_openBrWindow(http://homes.pacificscene.com/popup.php?type=renderings&ID=33','popUp','width=775,height=550')" /></a> Move the onclick to the link instead of putting it in your image tag. Link to comment https://forums.phpfreaks.com/topic/66894-solved-image-not-displaying/#findComment-335440 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.