njdubois Posted May 19, 2012 Share Posted May 19, 2012 Ok, I have a really basic php page set up to provide members of a profile system edit their details. I'm trying to emplement a google map to show the zip code but if I put the div in the place I want it, it doesn't show. First some code: $map_insert_html='<div id="map_canvas" style="width:10%; height:10%"></div>'; This works : <table width="100%" border="1"> <tr> <td width="10%" valign="top"> <?php switch($member_status) { case 'main_admin': include("main_menu.php"); break; } ?> </td> <td valign="top"> <?php if ($output_str!='') { echo $output_str .'<br />'; } echo $detail_form_html; ?> </td> <td> </td> </tr> </table> <?php echo $map_insert_html; ?> And this doesn't : <table width="100%" border="1"> <tr> <td width="10%" valign="top"> <?php switch($member_status) { case 'main_admin': include("main_menu.php"); break; } ?> </td> <td valign="top"> <?php if ($output_str!='') { echo $output_str .'<br />'; } echo $detail_form_html.$map_insert_html; ?> </td> <td> </td> </tr> </table> Maybe the table covers it up? I'm not sure what to look for, I don't know what the problem is! Any help on this is very appreciated! Thanks Nick Link to comment https://forums.phpfreaks.com/topic/262754-google-map-shows-when-i-put-it-there-but-not-if-i-put-it-there/ Share on other sites More sharing options...
smoseley Posted May 19, 2012 Share Posted May 19, 2012 More likely $detail_form_html has some unclosed element. Showing the HTML output would be more useful than showing the PHP in this case. Link to comment https://forums.phpfreaks.com/topic/262754-google-map-shows-when-i-put-it-there-but-not-if-i-put-it-there/#findComment-1346726 Share on other sites More sharing options...
njdubois Posted May 19, 2012 Author Share Posted May 19, 2012 Thanks for the fast reply! I have already went over $detail_form_html a few times. I will do so again. If I reverse the lines echo $map_insert_html; echo '<br />'; echo $detail_form_html; It still doesn't work. If there was still a problem with $detail_form_html, wouldn't the map show? Again, thanks for the prompt reply. You make a good point and I will search over the code again! Nick Link to comment https://forums.phpfreaks.com/topic/262754-google-map-shows-when-i-put-it-there-but-not-if-i-put-it-there/#findComment-1346729 Share on other sites More sharing options...
njdubois Posted May 19, 2012 Author Share Posted May 19, 2012 It has something to do with the table re-sizing after the map is rendered. [sOLVED] changed $map_insert_html='<div id="map_canvas" style="width:10%; height:10%"></div>'; to $map_insert_html='<div id="map_canvas" style="width:100px; height:100px"></div>'; Link to comment https://forums.phpfreaks.com/topic/262754-google-map-shows-when-i-put-it-there-but-not-if-i-put-it-there/#findComment-1346736 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.