Jump to content

[SOLVED] <object> tag gone wild


bobbinsbro

Recommended Posts

hi all.

i'm using an <object> tag to load dynamically generated content (by a php script) into a static .html page. the idea is to have only the contents of a certain <div> change without using javascript.

my html looks like this:

<html>
<head>
	<title>a page</title>
</head>
<body>
	a page
	<div>
		<!--[if IE]>

			<object classid="clsid:25336920-03F9-11CF-8FD0-00AA00686F13" data="content.html">

				Dynamic page content

			</object>

		<![endif]-->



		<!--[if !IE]> <-->

			<object type="text/html" data="content.html">

				Dynamic page content

			</object>

		<!--> <![endif]--> 
	</div>
</body>
</html>

 

i got the conditional comments from some website after discovering that IE needed the clsid.

 

my problem is that for some reason i can't fathom, instead of loading content.html, what gets loaded into the object are another copy of the above html in which the alt object text appears (see attached screenshot of the page in FF 3.0.6).

 

the page is stored in /public/html/ and so i content.html. however, the page is called by index.php which resides in /public/. when i tried setting data="/content.html", instead of the page being nested, i get the alternate object text. the same happens when i try data="/html/content.html".

 

a few examples of things i tried putting in content.html:

1) <html><body>index page</body></html>

2) index page

 

what am i doing wrong?

 

thanx in advance.

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/148136-solved-tag-gone-wild/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.