Forum Moderators: coopster
i have a few websites under my belt but nothing too adventurous as yet
im trying to learn new stuff everyday and have just got into php.
i must say what a help it is.
the include file is the best i've seen... lol
i have almost finished using the include files for all my navigation in my sites but came across an oddity.
i use php include for my sites top logos and navigation,with rollover links.that works fine.
i like to use rollover links in the specific site as its mainly graphics in there.
so i add the include logos etc then go into the main part where the html is
again i wanted to use rollover images for my links.
the html works fine alone
and the php logo files work well alone
when i add them in the same page it all goes pear shaped.
i havn't tried using php to create the second lot of rollovers and see if that works yet.
i just thought it odd that this should happen.
anyone any ideas?
i didnt know wether to post the code or not but if it helps i can.
thanks
let me try and make this easier fo rme...im not very technically minded but i can usually get these things to work.
i probably do this the wrong way round but it seems to work for me.
i usually make the html page i need and test that first,so
in the body i wanted to use 6 x rollover images as links
<table width="700" border="0">
<tr>
<td><div align="center">
<p> </p>
<p> </p>
<p><a href="news.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('news','','images/misc section/newsd.jpg',1)"><img src="images/misc section/news.jpg" name="news" border="0" id="news" /></a></p>
</div></td>
</tr>
<tr>
<td><div align="center"><a href="forsale.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('for sale','','images/misc section/forsaled.jpg',1)"><img src="images/misc section/forsale.jpg" name="for sale" border="0" id="for sale" /></a></div></td>
</tr>
<tr>
<td><div align="center"><a href="scrapbook.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('scrapbook','','images/misc section/scrapbookd.jpg',1)"><img src="images/misc section/scrapbook.jpg" name="scrapbook" border="0" id="scrapbook" /></a></div></td>
</tr>
<tr>
<td><div align="center"><a href="arenatour.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('arena dates','','images/misc section/arenad.jpg',1)"><img src="images/misc section/arena.jpg" name="arena dates" border="0" id="arena dates" /></a></div></td>
</tr>
<tr>
<td><div align="center"><a href="stadiumtour.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('stadium dates','','images/misc section/stadiumd.jpg',1)"><img src="images/misc section/stadium.jpg" name="stadium dates" border="0" id="stadium dates" /></a></div></td>
</tr>
<tr>
<td><div align="center"><a href="donate.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('donations','','images/misc section/donated.jpg',1)"><img src="images/misc section/donate.jpg" name="donations" border="0" id="donations" /></a></div></td>
</tr>
<tr>
<td><div align="center">
<p> </p>
<p> </p>
</div></td>
</tr>
<tr>
<td><div align="center"><a href="file:///......./xmaspartyfrt.html"><img src="images/XMASPARTYLINK.gif" alt="xmas party pics link" width="200" height="75" /></a></div></td>
</tr>
<tr>
<td><div align="center">
<p> </p>
<p><img src="images/funky2logo.jpg" alt="funky2designs link" width="160" height="48" onclick="MM_goToURL('parent','http://www.example.co.uk/index.html');return document.MM_returnValue" /></p>
</div></td>
</tr>
<tr>
<td><p> </p>
<p align="center">©example.co.uk 2008</p></td>
</tr>
</table>
this gave me what i needed in teh body section
this works fine as a html page.
then i wanted to add my logo and nav php file at the top,which works fine as it is on its own.
so i add in the line
<?php include("topnav.php")
?>
where i need it positioning and save the whole page as a .php file
goto my browser and all looks well but the rollovers have stopped working,but not on all the files.
and if i refresh its never the same rollovers that dont work...
i solved the problem by not using the include php line and using the html of the php file instead,as its only 2 pages i wasnt that bothered about rewriting it.
i just thought it was an oddity
can you explain this?
are we allowed to add links to show you the finishing pages in here?
if so i will send u the links to both pages.
[edited by: eelixduppy at 2:37 pm (utc) on Feb. 4, 2008]
[edit reason] example.com [/edit]
If so, then the includes wont be working right as its not reading the javascript. Hence the rollovers not working.
You can use CSS for graphical rollovers too, much easier to work with, much less code and will still work with javascript turned off.
:)