473,398 Members | 2,113 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,398 software developers and data experts.

Include one html file in another

For a non essential enhancement of one of my pages I'd like to include a
remote html file via javascript (server side is not available to me).

The "include" method that I'm familiar with:

<script src="include.js" type="text/javascript"></script>

with include.js containing:

document.write("<table>")
document.write("<tr>")
[...]

wouldn't work because it's a remote file. Is there a way to include a
remote file?

--
Spartanicus
Jul 20 '05 #1
6 3406
In article <t6********************************@4ax.com>, me@privacy.net
says...
For a non essential enhancement of one of my pages I'd like to include a
remote html file via javascript (server side is not available to me).

The "include" method that I'm familiar with:

<script src="include.js" type="text/javascript"></script>

with include.js containing:

document.write("<table>")
document.write("<tr>")
[...]

wouldn't work because it's a remote file. Is there a way to include a
remote file?


<script src="http://otherserver.com/include.js" type="text/javascript">
</script>

--
Hywel I do not eat quiche
http://kibo.org.uk/
http://kibo.org.uk/mfaq.php
Jul 20 '05 #2
Hywel <hy**********@hotmail.com> wrote:
For a non essential enhancement of one of my pages I'd like to include a
remote html file via javascript (server side is not available to me).


<script src="http://otherserver.com/include.js" type="text/javascript">
</script>


HTML file

--
Spartanicus
Jul 20 '05 #3
In article <40********************************@4ax.com>, me@privacy.net
says...
Hywel <hy**********@hotmail.com> wrote:
For a non essential enhancement of one of my pages I'd like to include a
remote html file via javascript (server side is not available to me).


<script src="http://otherserver.com/include.js" type="text/javascript">
</script>


HTML file


So why did you give an example of a JAVASCRIPT file that WRITES out
HTML?

<iframe> - bad.

--
Hywel I do not eat quiche
http://kibo.org.uk/
http://kibo.org.uk/mfaq.php
Jul 20 '05 #4
Hywel <hy**********@hotmail.com> wrote:
>> For a non essential enhancement of one of my pages I'd like to include a
>> remote html file via javascript (server side is not available to me).
>
><script src="http://otherserver.com/include.js" type="text/javascript">
></script>
HTML file


So why did you give an example of a JAVASCRIPT file that WRITES out
HTML?


To prevent being pointed out how to do that, it would have been useless
as the question specifically pertained to including a non local file.
<iframe>


Different thing completely, iframe/object opens a new viewport, included
html is part of the original document.

--
Spartanicus
Jul 20 '05 #5
In article <k5********************************@4ax.com>, me@privacy.net
says...
Hywel <hy**********@hotmail.com> wrote:
>> For a non essential enhancement of one of my pages I'd like to include a
>> remote html file via javascript (server side is not available to me).
>
><script src="http://otherserver.com/include.js" type="text/javascript">
></script>

HTML file


So why did you give an example of a JAVASCRIPT file that WRITES out
HTML?


To prevent being pointed out how to do that, it would have been useless
as the question specifically pertained to including a non local file.
<iframe>


Different thing completely, iframe/object opens a new viewport, included
html is part of the original document.


How about using JavaScript to get the remote page into an XML object,
then use an almost empty XSL to display the HTML?

--
Hywel I do not eat quiche
http://kibo.org.uk/
http://kibo.org.uk/mfaq.php
Jul 20 '05 #6
Hywel <hy**********@hotmail.com> wrote:
Different thing completely, iframe/object opens a new viewport, included
html is part of the original document.


How about using JavaScript to get the remote page into an XML object,
then use an almost empty XSL to display the HTML?


Sounds intriguing, care to expand?

--
Spartanicus
Jul 20 '05 #7

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

Similar topics

5
by: Astra | last post by:
Hi All Could you please confirm whether it is possible to include an include file, which is on another site, but still on the same set of web servers. I want to upload a default paeg to a...
0
by: ym | last post by:
Hi, Has anybody done this before... The current html file has to 2 drop down boxes. Depending on the selection chosen, there is a predetermined html file to load. My new asp file will...
3
by: Brit | last post by:
Hello, I have been trying to include a js file from within another js file. I can get this to work for firefox, but not i.e. What I have is a.html ... <script language='JavaScript'...
6
by: tshad | last post by:
In my User control, I tried to do this: *************************************************************************** <Script runat="server"> Public ClientName As String = "<!-- #include file =...
11
by: MBS | last post by:
I am playing around with some PHP code. I want to put in an include() function so I can include existing HTML code and output it to the browser. Lo and behold PHP does not support relative paths...
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....
11
by: cybervigilante | last post by:
I can't seem to change the include path on my local winmachine no matter what I do. It comes up as includ_path .;C:\php5\pear in phpinfo() but there is no such file. I installed the WAMP package...
4
by: Jon Slaughter | last post by:
I'm using eval to excute some mixed php and html code but I cannot debug it. I am essentially using filegetcontents to load up a php/html file and then inserting it into another php/html file and...
6
by: j.woodcock | last post by:
is there a way of having a file that's name is a variable (eg dependant on the user name) act like a include. i know that you cant define the file for an include asp tag using a variable and that...
1
by: yemen2007 | last post by:
hi ever one. i have problem in my html file. i have header file , footer file, and index file. i want compile the header , and footer in the index file use include file put it is not work. this my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.