/    Sign up×
Community /Pin to ProfileBookmark

Placing a .htm file on a web page other than using an iFrame?

I know how to have an image appear on a web page, i.e. <img src=””> and a video file is <embed src=””>, but what is the code for placing a .htm file on a web page, other than using an <iframe src=””>?

The iframe has no flexibility in height whether in fixed or percentage measurement and places some unwanted border spacing around the .htm file; is there a simpler code that just opens the file on the web page where placed with automatic sizing as in an image file?

The file resides on my cable provider’s storage server where it will jump to my opening web page provided by another hosting site.

I’ve spent a day trying out different code possibilities before grudgingly settling on the iFrame approach.

Alternative short and sweet recommendation appreciated.

to post a comment
HTML

7 Comments(s)

Copy linkTweet thisAlerts:
@_Aerospace_Eng_Oct 23.2006 — You can try the php method.
[code=php]<?php

$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_URL,'http://fullurltootherpage.com');
curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);
curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);

if (!empty($buffer))
{
print $buffer;
}
?> [/code]

though I think the iframe is probably the best way. If the page you are trying to put the other page on is on the same domain then you can use javascript resize the iframe dynamically. Also frameborder="0" will get rid of that "ugly frame" around the content.

http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm
Copy linkTweet thisAlerts:
@MiddayauthorOct 23.2006 — Dear Aerospace Eng,

Nothing showed up on my html practice editor when I used your code.

The file comes from a different hosting provider to my separate web hosting page.

I can do with or without the frameborder; it's the buffer spacing around the .htm file that I don't want. Decreasing the width and height doesn't eliminate the buffer spacing; that crops the file unacceptably.

But thanks for the quick response.
Copy linkTweet thisAlerts:
@_Aerospace_Eng_Oct 23.2006 — Dear Aerospace Eng,

Nothing showed up on my html practice editor when I used your code.
[/QUOTE]

And its not going to. Its not even html. Its php, it needs to be put on a webserver that supports php.
Copy linkTweet thisAlerts:
@NogDogOct 23.2006 — You can use CSS to adjust the appearance of the iframe just as you would any other HTML element. The dynamic height problem may still be an issue, but things like borders, margins, and padding are all adjustable with CSS.
Copy linkTweet thisAlerts:
@MiddayauthorOct 23.2006 — Hey NogDog,

Long time, no see ...

I was accepting the iFrame limitations and inserting the file in the first of my Midday ValUShops.com eBay listing descriptions and just found out that iFrames are not allowed on eBay (What else is new ...).

Isn't there any simple embed code for this type file?

Here's the file which will work fine in your browser:

http://home.comcast.net/~middaynews/ValUShopsShowcase.htm

A simple <???? src="http://home.comcast.net/~middaynews/ValUShopsShowcase.htm"></????> is what I'm looking for if it exists.

What say you?
Copy linkTweet thisAlerts:
@WebJoelOct 23.2006 — Couldn't you merely use the <object> tag, like thus:

<object type="text/html" data="http://www.name.html style="width:nH; height:nH; ></object>

whereby "nW" is the width and 'nH' is the height? I use this very same thing to load a client's othersite calendar into her site at the demensions of her calendar. This should load an external *html file into the <object>. Not sure how 'correct' this method is. I had wanted to use an RSS feed, so that her calendar would be automatically updated 'live' through her site, but I think that as a security precaution, RSS feeds need to reside on the same server in order to function... so I used this method instead. To see her calendar updated while on her site, one would need to hit "refresh" (no problem doing that). We didn't even really require 'live update' to her site... just current per page-load.
Copy linkTweet thisAlerts:
@MiddayauthorOct 24.2006 — Way to go WebJoel,

I deleted the type="text/html", placed in a few missing quotes ("), and this is the code that works on the eBay item description, store page, and About Me page, but not on the eBay blog page:

<center><object data="http://home.comcast.net/~middaynews/ValUShopsShowcase.htm" border="0" style="width:500; height:150;"></object>

I had a problem with IE7 not showing the file and had to go in and custom reset security settings for this to work. I don't know what surfers have their settings at so this will be a problem for those who accept the new default security recommendation for IE7.

The minor annoyance is the box and right-side scroll bar that enclose the file in IE7; I don't know if this happens in IE6. Firefox and Opera display the file sans box and scroll very nicely. I tried scroll="no" with scrolling="no" but it had no effect on the IE7 appearance.

But all-in-all, a good day's work.

Thanks WebJoel
×

Success!

Help @Midday spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...