Solved

Load HTML into <DIV>

Posted on 2000-04-03
13
243 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
 
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
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…
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now