Solved

Load HTML into <DIV>

Posted on 2000-04-03
13
247 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
[X]
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
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
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…

738 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