lesk Posted February 18, 2010 Share Posted February 18, 2010 Hi! Actually i have 2 problems. First one is that on firefox the php script dosent work, and on safari it works just the way my friend (making a portfolio for her) wants it but it crashes when you use the dropdown menu. the php. <table cellspacing="5"> <tr> <?php $dirname = "../bilder/portratt"; $images = scandir($dirname); $dirname = "../bilder/portratt"; $thumb = scandir($dirname); $ignore = Array(".", ".."); foreach($images as $file) { if(!in_array($file, $ignore)) { echo "<td><img src=\"..\bilder\portratt/$file\" height=\"400\" alt=\"bilderna\" ></td>"; }; } ?> </tr> </table> the html for the dropdown <ul id="right_menu"> <li><a href="#">Portfolio</a> <ul> <li><a href="html/portratt.php" target="bildplats">Porträtt</a></li> <li><a href="html/brollop.php" target="bildplats">Bröllop</a></li> <li><a href="html/natur.php" target="bildplats">Natur</a></li> </ul> </li> </ul> <ul id="right_menu2"> <li><a href="#">Blogg</a></li> <li><a href="html/kontakt2.php" target="bildplats">Kontakt</a></li> </ul> And the css for the dropdown li ul { display: none; } li:hover > ul { display: block; } ul#nav li ul { display: none; } ul#nav li:hover > ul { display: block; } The code works in safari, but then the dropdown menu makes the browser to crash (atleast i think it makes it crash, it happens when you start messing around on it). And in firefox the dropdown dosent make it crash but instead it dosent show any pictures. Just shows the alt wich is "bilderna" Like if its 4 pictures in that folder it says bilderna four times. But safari shows me four pictures. I cant get my head around this, really need some help on this one Link to comment https://forums.phpfreaks.com/topic/192488-firefox-having-trouble-with-php/ Share on other sites More sharing options...
sader Posted February 18, 2010 Share Posted February 18, 2010 src=\"..\bilder\portratt/$file\" => src=\"../bilder/portratt/$file\" did this solve your problem? Link to comment https://forums.phpfreaks.com/topic/192488-firefox-having-trouble-with-php/#findComment-1014212 Share on other sites More sharing options...
lesk Posted February 18, 2010 Author Share Posted February 18, 2010 Thanks! The pictures works now! =D Just one problem left, safari keep crashing when i hover over the dropdown menu. Link to comment https://forums.phpfreaks.com/topic/192488-firefox-having-trouble-with-php/#findComment-1014220 Share on other sites More sharing options...
sader Posted February 18, 2010 Share Posted February 18, 2010 it's javascript(most likely) problem not php try get help on javascrip section Link to comment https://forums.phpfreaks.com/topic/192488-firefox-having-trouble-with-php/#findComment-1014223 Share on other sites More sharing options...
lesk Posted February 18, 2010 Author Share Posted February 18, 2010 Its a css dropdown, but i ask in the css section Thanks for the help on the php! I appreciate it a lot! Link to comment https://forums.phpfreaks.com/topic/192488-firefox-having-trouble-with-php/#findComment-1014225 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.