469,275 Members | 1,471 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

Object Tag not working in IE

nathj
938 Expert 512MB
Hi,

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
  1. $llRestrictedDisplay    = ($lnHeadlineCount > 0);
  2.     $lnHeadlinePntr            = 0 ;
  3.  
  4.     // get the data to display
  5.     $lcHeadlineSelect        = 
  6.     "SELECT a.ID, a.headline, a.summary
  7.     FROM newsItem a    
  8.     WHERE a.publish <= now() AND not hasExpired"; 
  9.     $laHeadlineList = $loDB->queryGetData($lcHeadlineSelect);
  10.     // display the data    accordingly
  11.     foreach($laHeadlineList as $lcHeadline)
  12.     {
  13.         if(! $llRestrictedDisplay || $lnHeadlinePntr < $lnHeadlineCount)
  14.         {        
  15.             echo "<object>";
  16.             echo "<h4>" . $lcHeadline['headline'] . "</h4><br />";
  17.             echo "<p>" . $lcHeadline['summary'] . "</p>";
  18.             echo "<a class='inlineLinkRight' href='newsstory.php?id=" . $lcHeadline['ID'] . "' title='full story'> full story... </a><br />";
  19.             echo "<hr/>";
  20.             echo "</object>";
  21.         }
  22.         $lnHeadlinePntr++;
  23.     }                     
  24.  
This is included in a file that defines $lnHeadlineCount so that the file can be used in different places for slightly different things.

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
Jun 22 '07 #1
2 3152
nathj
938 Expert 512MB
Just to let you all know. I didn't need the <object> tag after all. I had a dodgy <p> floating around in another file. Sorted that out and the code validates and displays in IE7 just fine.

Thanks
Nathan
Jun 25 '07 #2
drhowarddrfine
7,435 Expert 4TB
Xhtml ver 1.1 is only to be served as XML, which I doubt you are doing. You should change back to ver 1.0.
Jun 25 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Simon Strandgaard | last post: by
reply views Thread by Ian Pilcher | last post: by
9 posts views Thread by Tom | last post: by
2 posts views Thread by Desmond | last post: by
7 posts views Thread by J-T | last post: by
12 posts views Thread by Andrew Poulos | last post: by
1 post views Thread by =?ISO-8859-1?Q?Lasse_V=E5gs=E6ther_Karlsen?= | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.