XHTML Strict 1.0 alternative to iframe?

The title says it all, is there an alternative to iframes that validates XHTML Strict 1.0 ?

I need to put a little piece of HTML from another server to my site.

Thanks

Why don’t you take xhtml 1.0 transitional?

[offtopic]Denmark is cool, actually im living their…[\offtopic]

coda

I do everything strict !

So, it´s not possible ?

An alternative is to use server side includes.

Well, does server side includes work for URLs outside my own domain ?

According to this you can but I guess it depends on the set up on the server you are pulling the code from. Perhaps, someone with more knowledge can answer this?

That should go with server side includes. Then make a div element with overflow and you have an alternative…

just try it.

coda

"PHP include directives can also point at files on any web site using a full URL:

<?php include(“http://www.othersite.com/filename.html”); ?>

Of course, you must not steal content from another web site without the express written permission of the owners. To do so is a copyright violation and may lead to legal action against you."

I got the above from here

The other server is also my site.

I will try the php include - thanks

If dropping to Transitional is the only/quickest way to do something, then why not?

You could also try this, but I’m not guaranteeing it will work across all browsers:


<object type="text/html" data="http://someurl.com/htmlpage"
width="250" height="500">
<param name="src" value="http://someurl.com/htmlpage" />
Alternate content for browsers without object support.
</object>

Thanks, I will try that too.

As Vinnie said, object is what should be used instead of iframe. Unfortunately, some rather popular browsers have poor support for object. :frowning:

Not sure if you’ve seen this already, but Aleksander Vacic described an alternative method to iframes on his site

Looks interesting, I will play with that also.

You can also use:



div.myframe { width: 400px; height: 500px; overflow: scroll; }




<div class="myframe">You can put some text here, but not put an external HTML file, But you could use php includes.</div>


Object will not work in IE 6.0 for external domains. If you have to do it, you need to change the security settings of your browser. Even for IFRAMES accessing cookies will fail due to security settings in IE 6.0.

Is there any way to overcome? Is there any alternate method other than IFRAME and Object? Any body please help.

I decided on server side includes - faster and better.

You can use this

<object classid=“clsid:25336920-03F9-11CF-8FD0-00AA00686F13” type=“text/html” data=“xpto.html” width=“300” height=“300”></object>

Hey all,

I just wanted to post this is the case that someone may need it.

gronkyco.com/blog-posts/xhtml-strict-iframes-using-jquery/

In that post I describe how to use jQuery to create xHTML-Strict iFrames. I looked for ages for a solution and finaly just decided to make my own.

hope it helps!

Cheers

That is just fooling the validator by changing the HTML to be invalid after the page loads.