Forum Moderators: open

Message Too Old, No Replies

Elements not being displayed

Elements in several of my pages aren't being registered by browsers

         

Numberman

1:42 pm on Jul 13, 2004 (gmt 0)

10+ Year Member



I'm running a small site for a little project of mine; It's basic XHTML 4.01 with PHP support, although I only the PHP for includes.

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.

BlobFisk

5:01 pm on Jul 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Numberman,

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]

kaled

5:04 pm on Jul 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Validate the page with an html checker. If all the browsers agree, then the fault is almost certainly yours. Probably just a silly mistake.

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.