Javascript Not Working Within An Include
Posted: Tue Jul 03, 2007 9:11 am
I don't pretend to be a pro at PHP, but I do find includes quite nifty, and I've got something strange going on in my latest project.
Basically every page on the site boils down to:
Everything but the content is in those two includes, including the header, navigation, footer, etc.
In top.html, all the normal stuff you'd see in a header is there - including two links to CSS files:
The ie.css file is a color fix for IE6 and 7, since I use images with a background that matches the background of the page (to avoid transparency issues), and IE uses a different rasterizing engine, so without the fix the colors don't match.
The issue is that the if statement isn't working. I googled around and the only suggestion I could find was that Javascript wasn't parsing correctly within the include, but the strange thing is that I've got a whole lot more java than that just a few lines down, for rollover images, and it all parses perfectly.
Thanks in advance for any help.
Basically every page on the site boils down to:
Code: Select all
<?php include('includes/top.html'); ?>
Here goes the content of the page.
<?php include('includes/bottom.html'); ?>In top.html, all the normal stuff you'd see in a header is there - including two links to CSS files:
Code: Select all
<link type="text/css" rel="stylesheet" href="css/maincss.css" />
<!--[if IE]><link type="text/css" rel="stylesheet" href="css/ie.css" /><![endIf]-->The issue is that the if statement isn't working. I googled around and the only suggestion I could find was that Javascript wasn't parsing correctly within the include, but the strange thing is that I've got a whole lot more java than that just a few lines down, for rollover images, and it all parses perfectly.
Thanks in advance for any help.