473,394 Members | 1,932 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,394 software developers and data experts.

How can I "include" an HTML file from another server?


Hi,

got the following problem: I want to include some code in an HTML page
so that at a particular place, it fetches another HTML file from
another server and puts it in. Reason for this is that this space keeps
changing. The original HTML runs on an eBay server, i.e. I cant place
the second file on their server.

Is there a standard HTML code or some Javascript that can do this?

Thanks,
Michael

Mar 18 '06 #1
14 3383
On Sat, 18 Mar 2006 17:51:10 +0100, <in******@hotmail.de> wrote:
got the following problem: I want to include some code in an HTML page
so that at a particular place, it fetches another HTML file from
another server and puts it in. Reason for this is that this space keeps
changing. The original HTML runs on an eBay server,


Does author/owner of that page on eBay server know that you want to run
his/her content in your pages?

--
______PretLetters:
| weblog | http://www.pretletters.net/weblog/weblog.html |
| webontwerp | http://www.pretletters.net/html/webontwerp.html |
|zweefvliegen | http://www.pretletters.net/html/vliegen.html |
Mar 18 '06 #2

Does it matter? ;) But to answer your question: I run numerous auctions
on ebay and I want to run a self-ad in my auction, but because
everything runs automated with templates etc, I want to store the "ad"
on my own server and change it whenever I want to without having to
update the auctions or templates.

Mar 18 '06 #3
[ Before any further participating in usenet newsgroups, please read
<URL:http://www.safalra.com/special/googlegroupsreply/> or, better yet,
get a proper usenet news client ]

On Sat, 18 Mar 2006 18:06:26 +0100, <in******@hotmail.de> wrote:
Does it matter? ;)
I don't see the humor in that. To me is does matter a lot, since my
content gets abused by others too many times.
But to answer your question: I run numerous auctions
on ebay and I want to run a self-ad in my auction,
I have no idea what a self-ad is?
but because
everything runs automated with templates etc, I want to store the "ad"
on my own server and change it whenever I want to without having to
update the auctions or templates.


I see. This is the other way around than I originally understood your
question. As I understand it now, you want to use some of _your_ code
within an auction that is run on eBay? I'm not familiar with eBay.
--
______PretLetters:
| weblog | http://www.pretletters.net/weblog/weblog.html |
| webontwerp | http://www.pretletters.net/html/webontwerp.html |
|zweefvliegen | http://www.pretletters.net/html/vliegen.html |
Mar 18 '06 #4
in******@hotmail.de wrote:

Hi,

got the following problem: I want to include some code in an
HTML page so that at a particular place, it fetches another
HTML file from another server and puts it in. Reason for this
is that this space keeps changing. The original HTML runs on an
eBay server, i.e. I cant place the second file on their server.


http://www.w3.org/TR/html401/present...ml#edef-IFRAME

<IFRAME src="foo.html" width="400" height="500"
scrolling="auto" frameborder="1">
[Your user agent does not support frames or is currently
configured
not to display frames. However, you may visit
<A href="foo.html">the related document.</A>]
</IFRAME>
Mar 18 '06 #5
__/ [ Penguiniator ] on Saturday 18 March 2006 19:42 \__
in******@hotmail.de wrote:

Hi,

got the following problem: I want to include some code in an
HTML page so that at a particular place, it fetches another
HTML file from another server and puts it in. Reason for this
is that this space keeps changing. The original HTML runs on an
eBay server, i.e. I cant place the second file on their server.


http://www.w3.org/TR/html401/present...ml#edef-IFRAME

<IFRAME src="foo.html" width="400" height="500"
scrolling="auto" frameborder="1">
[Your user agent does not support frames or is currently
configured
not to display frames. However, you may visit
<A href="foo.html">the related document.</A>]
</IFRAME>


Thanks, Penguiniator. I wanted to do this 6 months ago, but the folks in
alt.html made no such suggestion.

In case you are curious, http://www.schestowitz.com/introduction.htm (see 2
iframes at the bottom).

Best wishes,

Roy
Mar 19 '06 #6
Sat, 18 Mar 2006 11:42:08 -0800 from Penguiniator <no-
sp**@spamme.com>:
http://www.w3.org/TR/html401/present...ml#edef-IFRAME

<IFRAME src="foo.html" width="400" height="500" scrolling="auto" frameborder="1">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="foo.html">the related document.</A>] </IFRAME>


Thanks for jogging my memory. But having read the spec I'm confused
on one point:

How should I set the height attribute? I want this iframe to take as
much space as is available in the window. I know I don't want a fixed
number of pixels. But height="100%" is ignored by both Mozilla 1.7
and IE6. I tried style="height:100%" and that also had no effect. I'm
sure I'm failing to understand something about teh box model; can you
help me out?

I have a small test case for view at
http://oakroadsystems.com/math/deriv.htm
It passed validation by WDG and W3C for 4.01 Transitional.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Mar 19 '06 #7
Stan Brown wrote:
How should I set the height attribute? I want this iframe to
take as much space as is available in the window.


http://www.quirksmode.org/css/width.html

There is a css min-height rule available, but:

"Supported fully by Mozilla and Opera.

min-height is supported by Explorer 6 only for table elements
inside a table with table-layout: fixed.

min-height on body or html works only in Opera."

However, getting your iframe to stretch dynamically with such a
rule, even in Firefox or Opera, may give you disappointing
results. Try it to see what I mean.

And if you're worried about your IE user's experience with your
page as well as FF and Opera, ect., then this is out of the
question.

You're really kind of stuck with setting height explicitly.
Mar 19 '06 #8
Sun, 19 Mar 2006 09:49:17 -0800 from Penguiniator <no-
sp**@spamme.com>:
Stan Brown wrote:
How should I set the height attribute? I want this iframe to
take as much space as is available in the window.
[snip references and comments] You're really kind of stuck with setting height explicitly.


Thanks for your comments. I won't blame the messenger, but--

Drat! If I make it small enough for people with 800x600 screens (even
assuming that their browser window occupies the whole of the screen
height) it'll be way too small for people at higher resolutions. But
if I make it larger, then at low resolution there's both a scroll bar
for the iframe and a scroll bar for the overall browser window. At
least that's what Mozilla does, and I can't imagine IE being any less
annoying.

Any suggestions? I want users to be able to access these off-site
pages of mine without having to get into the other site's navigation.
Eventually I'll move them all over and integrate them into my main
site, but I was hoping for something quick and reasonably
satisfactory in the meantime.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Mar 19 '06 #9
Stan Brown wrote:

Any suggestions? I want users to be able to access these off-site
pages of mine without having to get into the other site's navigation.


http://developer.ebay.com/
Mar 20 '06 #10
Mon, 20 Mar 2006 08:56:50 -0500 from Harlan Messinger
<hm*******************@comcast.net>:
Stan Brown wrote:

Any suggestions? I want users to be able to access these off-site
pages of mine without having to get into the other site's navigation.


http://developer.ebay.com/


Sorry, eBay?

I think you may have my query confused with someone else's. (I didn't
start a new thread because my question, too, is about including a
page in another.)

My pages are presently at two sites. ORS <http://oakroadsystems.com/>
is primary and is where all development and maintenance happen. TC3
<http://www.acad.sunytccc.edu/instruct/sbrown/> is no longer
maintained. Eventually I want to bring my pages of general interest
over physically from TC3 to ORS. But as a first step I want to
integrate (some of) the TC3 pages into the navigation scheme of ORS.

http://oakroadsystems.com/math/deriv.htm is a first attempt, though
not adequate as has already been observed.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Mar 20 '06 #11
Stan Brown wrote:
Drat! If I make it small enough for people with 800x600 screens (even
assuming that their browser window occupies the whole of the screen
height) it'll be way too small for people at higher resolutions.


So include it flexibly inline - eg with
<div class="included"> .....</div>

http://apache.webthing.com/mod_publisher/macro.html

--
Nick Kew
Mar 20 '06 #12
Sun, 19 Mar 2006 09:49:17 -0800 from Penguiniator <no-
sp**@spamme.com>:
Stan Brown wrote:
relating to http://oakroadsystems.com/math/deriv.htm
How should I set the height attribute? I want this iframe to
take as much space as is available in the window.


http://www.quirksmode.org/css/width.html

However, getting your iframe to stretch dynamically with such a
rule, even in Firefox or Opera, may give you disappointing
results. Try it to see what I mean.


If by "disappointing results" you mean "no results", I agree with
you. :-) Setting min-height didn't seem to have any effect at all in
Mozilla 1.7.
You're really kind of stuck with setting height explicitly.


I set 400, which seems about right for my 1024x768 screen. I've added
text making it easy for the user to reopen the page in a separate
window (which of course savvy users could do anyway).

Comments welcome.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Mar 20 '06 #13
thanks, that seems to work.! :)

any clue how to get rid of the visual frame?

Mar 21 '06 #14
never mind about the frame, figured that out myself... ;)

thanks again!

Mar 21 '06 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

43
by: steve | last post by:
I am quite frustrated with php’s include, as I have spent a ton of time on it already... anyone can tell me why it was designed like this (or something I don’t get)? The path in include is...
2
by: steve | last post by:
Hi, I need to do conditional script "include", but like to pull the code from db instead of a file. How do I do that? Reason: I like to implement some complex regex logic, and make it table...
2
by: N. Graves | last post by:
Hey, I need to have a template ASP page that can dynamically include another file depending on that I call in the address. I have yet to make this work. Here is a sample of what I thought...
4
by: Simon Wigzell | last post by:
I often use : <!--#include file="filename"--> in my code to include often used bits of asp code. I told someone in another newsgroup about it but now I'm wondering if it will be supported for...
4
by: michaaal | last post by:
I have two folders in my website... Folder1 (this is where my #include file is, this is where the style.css is) --Folder2 (Folder2 is inside of Folder1) Folder2 contains a file that has...
3
by: Buddy Robbins | last post by:
Hey folks, I am re-writing an ASP.Net site for a company. The client wants to be responsible for the static content and navigation of their site, and I'll be responsible for any dynamic content. ...
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
2
by: Susan Baker | last post by:
Hi, I am (trying) to compile some code I downloaded from the internet. The sources contain references to header files - using the form : #include <pathname/file> If I change the form to...
3
by: indessen | last post by:
Hi, got the following problem: I need to include an HTML file that sits on another server B in an HTML file that sits on server A, and I need to include this at a particular place in the file....
10
by: Eric | last post by:
Hello, I have some server side includes on a Classic asp page that look something like: <!-- #include virtual="/includes/file1.asp"--> <!-- #include virtual="/includes/file2.asp" --> <!--...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.