I am currently working on a new site, unfortunately it is all on the local network at present so I can't supply a URL. I am trying to build this site as valid XHTML 1.1, this is fine in FireFox and Opera but there is a problem with IE7.
The code I am using is as follows:
Expand|Select|Wrap|Line Numbers
- $llRestrictedDisplay = ($lnHeadlineCount > 0);
- $lnHeadlinePntr = 0 ;
- // get the data to display
- $lcHeadlineSelect =
- "SELECT a.ID, a.headline, a.summary
- FROM newsItem a
- WHERE a.publish <= now() AND not hasExpired";
- $laHeadlineList = $loDB->queryGetData($lcHeadlineSelect);
- // display the data accordingly
- foreach($laHeadlineList as $lcHeadline)
- {
- if(! $llRestrictedDisplay || $lnHeadlinePntr < $lnHeadlineCount)
- {
- echo "<object>";
- echo "<h4>" . $lcHeadline['headline'] . "</h4><br />";
- echo "<p>" . $lcHeadline['summary'] . "</p>";
- echo "<a class='inlineLinkRight' href='newsstory.php?id=" . $lcHeadline['ID'] . "' title='full story'> full story... </a><br />";
- echo "<hr/>";
- echo "</object>";
- }
- $lnHeadlinePntr++;
- }
I know the PHP side of this is fine. This works perfectly in FF and Opera however, IE7 displays three little boxes instead of the information within the object tags.
I'm sure I'm missing something with this. I f I drop the object tags the code doesn't validate and I really want to have this as a totally valid site.
If someone could point me in the right direction, show me what is missing then that would be great.
Many thanks
Nathan