kevinbarker Posted April 8, 2006 Share Posted April 8, 2006 Moring all,Still getting used to PHP, this is a strange on for me!I have a web site [a href=\"http://www.vsa-web.com/test/nav.php\" target=\"_blank\"]http://www.vsa-web.com/test/nav.php[/a] Where i include nav.php using the following code on all pages!<? include 'nav.php'; ?>If you go to [a href=\"http://www.vsa-web.com/test/nav.php\" target=\"_blank\"]http://www.vsa-web.com/test/nav.php[/a], i used a roll over image which works when you go to the URL direct! but if you do an include nav.php, the images dont work! have a look! this does not work in IE, but does using FireFox..[a href=\"http://www.vsa-web.com/test/index.php\" target=\"_blank\"]http://www.vsa-web.com/test/index.php[/a]Any ideas, thanksKev B Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted April 8, 2006 Share Posted April 8, 2006 There is nothing wrong with your PHP, but mainly to do with your Javascript. By looks of things iot the onMouseOut part that isn't working correcty. However the only mouse over that does work is the last one.SO I'd post your Javascript in the Javascript Help forum.EDIT: Argh! I know why it doesn't work now. It is becuase in your nav.php file you are repeating your self. As you have tweo lots of the same javascript. Clear out your nav.php file and so its just this:[code]<table border="0" cellpadding="0" cellspacing="0"> <tr> <td width="215" bgcolor="#FFFFFF"><a href="Inside_Pictures.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Inside Pictures','','images/nav1_over.jpg',1)"><img src="images/nav1.jpg" alt="Inside Pictures" name="Inside Pictures" width="215" height="38" border="0"></a></td> </tr> <tr> <td bgcolor="#FFFFFF"><a href="Swimming_Pool.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Swimming Pool','','images/nav2_over.gif',1)"><img src="images/nav2.gif" alt="Swimming Pool" name="Swimming Pool" width="215" height="31" border="0"></a></td> </tr> <tr> <td bgcolor="#FFFFFF"><a href="Torrevieja.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Torrevieja','','images/nav3_over.gif',1)"><img src="images/nav3.gif" alt="Torrevieja" name="Torrevieja" width="215" height="27" border="0"></a></td> </tr> <tr> <td bgcolor="#FFFFFF"><a href="La_Plaza.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('La Plaza','','images/nav4_over.gif',1)"><img src="images/nav4.gif" alt="La Plaza" name="La Plaza" width="215" height="29" border="0"></a></td> </tr> <tr> <td bgcolor="#FFFFFF"><a href="La_Zenia_Beach.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('La Zenia Beach','','images/nav5_over.gif',1)"><img src="images/nav5.gif" alt="La Zenia Beach" name="La Zenia Beach" width="215" height="28" border="0"></a></td> </tr> <tr> <td bgcolor="#FFFFFF"><a href="Spainish_Golf.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Spainish Golf','','images/nav6_over.gif',1)"><img src="images/nav6.gif" alt="Spainish Golf" name="Spainish Golf" width="215" height="29" border="0"></a></td> </tr> <tr> <td bgcolor="#FFFFFF"><a href="Things_to_do.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Things to do','','images/nav7_over.gif',1)"><img src="images/nav7.gif" alt="Things to do" name="Things to do" width="215" height="30" border="0"></a></td> </tr> <tr> <td bgcolor="#FFFFFF"><a href="Local_Markets.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Local Markets','','images/nav8_over.gif',1)"><img src="images/nav8.gif" alt="Local Markets" name="Local Markets" width="215" height="28" border="0"></a></td> </tr> <tr> <td bgcolor="#FFFFFF"><a href="Photo_Gallery.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Photo Gallery','','images/nav9_over.gif',1)"><img src="images/nav9.gif" alt="Photo Gallery" name="Photo Gallery" width="215" height="26" border="0"></a></td> </tr> <tr> <td bgcolor="#FFFFFF"><a href="Rental_Fees.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Rental Fees','','images/nav10_over.gif',1)"><img src="images/nav10.gif" alt="Rental Fees" name="Rental Fees" width="215" height="33" border="0"></a></td> </tr> <tr> <td bgcolor="#FFFFFF"><a href="Flights.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Flights','','images/nav11_over.jpg',1)"><img src="images/nav11.jpg" alt="Flights" name="Flights" width="215" height="44" border="0"></a></td> </tr> <tr> <td bgcolor="#FFFFFF"><a href="Maps.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Maps','','images/nav12_over.jpg',1)"><img src="images/nav12.jpg" alt="Maps" name="Maps" width="215" height="58" border="0"></a></td> </tr> <tr> <td bgcolor="#FFFFFF"><a href="Car_Rental.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Car Rental','','images/nav13_over.gif',1)"><img src="images/nav13.gif" alt="Car Rental" name="Car Rental" width="215" height="62" border="0"></a></td> </tr> <tr> <td background="images/049_21.jpg" bgcolor="#FFFFFF"><a href="Enquiry_Form.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Enquiry Form','','images/nav14_over.jpg',1)"><img src="images/nav14.jpg" alt="Enquiry Form" name="Enquiry Form" width="215" height="38" border="0"></a></td> </tr></table>[/code]Your menu should work properly now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.