473,413 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

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 3331
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

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

Similar topics

7
by: Simon Strandgaard | last post by:
There are no <iframe> tag in xhtml strict, instead I should use <object>. If I change <iframe> to <object> then my javascript stops working. I am curious to how to use <object> with javascript...
0
by: Ian Pilcher | last post by:
Howdy all! I'm working with XML schemas for the first time, so please be gentle! I am working on a graphics program (in Java if it matters), and I have decided to use XML files to store the...
9
by: Tom | last post by:
I am working with the this object as oppose to the StreamReader object becuase I need to access a file (to find the contents) while an external application is updating the file. When I was...
2
by: Desmond | last post by:
Hi, I would really appreciate if somebody could give some advise on this. I've a ASP.NET application that is supposed to send emails and it is tested to be working well on IIS 5.0 and tested...
7
by: J-T | last post by:
I can instantiate my object in my *ASP.NET* application in two ways: A) public sealed class RSSingleton { private static ReportingServiceProxy m_RsProxy=null; static RSSingleton() {...
12
by: Andrew Poulos | last post by:
With the following code I can't understand why this.num keeps incrementing each time I create a new instance of Foo. For each instance I'm expecting this.num to alert as 1 but keeps incrementing. ...
1
by: jsgough | last post by:
Hello, I was writing some code using ASP.NET 2.0 that consumed a COM library via interop on Friday and everything was working fine until about thirty minutes before I left for the day (isn't it...
2
by: Ralph | last post by:
Hi I don't understand why it's not working: function schedule(imTop){ this.tdImagesTop = imTop; } schedule.prototype.selectEl = function() { alert(this.tdImagesTop);
1
by: halekio | last post by:
Hi all, Please bear with me as I've only started programming in C# 2 weeks ago and this is my first contact with OOP. I ran into a situation where I needed to catch an event in an object that...
1
by: =?ISO-8859-1?Q?Lasse_V=E5gs=E6ther_Karlsen?= | last post by:
I get the above error in some of the ASP.NET web applications on a server, and I need some help figuring out how to deal with it. This is a rather long post, and I hope I have enough details that...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.