Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Load HTML into <DIV>

Posted on 2000-04-03
13
246 Views
Last Modified: 2006-11-17
I know it's possible to load the contents of a HTML file into a DIV; it's just.... how again? :-)

PS: I know the <layer src=""> tag in NS, I am worrying about the IE code.
0
Comment
Question by:nrico
  • 8
  • 2
  • 2
  • +1
13 Comments
 
LVL 1

Expert Comment

by:ManoloMA
ID: 2679464
Try with an include statement:

<!-- #include file="prueba.htm"-->
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 2679467
use this server side javascript:
<script language=javascript runat=server>
<!--
  var fso, f;
  fso = new ActiveXObject("Scripting.FileSystemObject");
  f = fso.OpenTextFile("c:\\myfile.html", 1);
  document.write(f.ReadAll());
//-->
</script>
0
 
LVL 1

Author Comment

by:nrico
ID: 2679481
I want to do it dynamically.
So I have the same div always, but load it with different contents on user demand.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Expert Comment

by:ManoloMA
ID: 2679490
You can use in IE an IFRAME, tyou can chage the src of the IFRAME dynamically, the problem is that NS don't accept IFRAMES
0
 
LVL 1

Author Comment

by:nrico
ID: 2679498
I want to do it dynamically.
So I have the same div always, but load it with different contents on user demand.
0
 
LVL 1

Author Comment

by:nrico
ID: 2679513
Sorry for that post.
----------------------------------
Yes I know about the IFRAME, but an IFRAME cannot be transparent and "floating divs" won't float over a frame edge.
So that's *definately* not what I need.
0
 
LVL 1

Author Comment

by:nrico
ID: 2679520
Sorry for that post.
----------------------------------
Yes I know about the IFRAME, but an IFRAME cannot be transparent and "floating divs" won't float over a frame edge.
So that's *definately* not what I need.
0
 
LVL 1

Author Comment

by:nrico
ID: 2679528
Sorry for that post.
----------------------------------
Yes I know about the IFRAME, but an IFRAME cannot be transparent and "floating divs" won't float over a frame edge.
So that's *definately* not what I need.
0
 
LVL 1

Author Comment

by:nrico
ID: 2679540
Sorry for that post.
----------------------------------
Yes I know about the IFRAME, but an IFRAME cannot be transparent and "floating divs" won't float over a frame edge.
So that's *definately* not what I need.
0
 
LVL 1

Author Comment

by:nrico
ID: 2679547
Wow! My browser is a little @#$#^$$!!ed up it seems!
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 100 total points
ID: 2679566
However use an IFRAME to get the data:

<iframe width=1 height=1 name=myIframe onLoad="document.all.myDiv.innerHTML=this.document.body.innerHTML"></iframe>
<div id=myDiv></div>


Data MUST come from the same server!

Michel
0
 
LVL 1

Author Comment

by:nrico
ID: 2684069
I figured that out myself by now, but I'm gonna give you the points anyway :-).
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2685101
Thanks - decent of you ;-)

Michel
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Page auto-refreshes when scrolled on iPhone. 5 53
How to make a good PHP + MySQL + JS pagination system? 3 31
HTML Anchor Link Problem 3 35
send email part1 9 22
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question