Forum Moderators: open
My site has several key elements (all of which are div tags) which are displayed in every page, so I wrote these elements into seperate PHP pages and then use the include() function on each page that needs them. Also, all the javascript and CSS is tied to two external files.
This works wonderfully for my site's index page, but for some reason it ceases to function on another page. The non-functioning pages are duplicates of the index page, they just use a different include path to call data. The first piece of information is included (an iframe, which I know isn't a particularly good element to be using in the first place, but I couldn't see a valid alternative). The iframe renders without error. The issue comes when the other information is included, four div tags that make up menus and a little copyright notice at the page's bottom. They don't render, and furthermore, the javascript used on the page will not acknowledge their existence.
I checked the source code of the page being sent to the browser (in Internet Explorer, Netscape Navigator, Firefox, and Mozilla), and the elements are in the source, in the right place, the browser just isn't creating them properly.
I'd appreciate if anyone could shed some light on this, I'm utterly baffled.
It sounds liks the paths in the non-index pages could be the source of the problem here... Also have you tried validating [validator.w3.org] your pages?
Also, are they HTML4.01 or XHTML1.0? There is no XHTML4.01 yet!
[edited by: BlobFisk at 5:04 pm (utc) on July 13, 2004]
If that doesn't locate the problem, strip the page down until it renders correctly and add to it bit by bit until it renders incorrectly. I'm sure you'll find the answer.
Kaled.