Load HTML into <DIV>

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.
LVL 1
nricoAsked:
Who is Participating?
 
Michel PlungjanConnect With a Mentor IT ExpertCommented:
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
 
ManoloMACommented:
Try with an include statement:

<!-- #include file="prueba.htm"-->
0
 
CJ_SCommented:
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
nricoAuthor Commented:
I want to do it dynamically.
So I have the same div always, but load it with different contents on user demand.
0
 
ManoloMACommented:
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
 
nricoAuthor Commented:
I want to do it dynamically.
So I have the same div always, but load it with different contents on user demand.
0
 
nricoAuthor Commented:
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
 
nricoAuthor Commented:
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
 
nricoAuthor Commented:
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
 
nricoAuthor Commented:
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
 
nricoAuthor Commented:
Wow! My browser is a little @#$#^$$!!ed up it seems!
0
 
nricoAuthor Commented:
I figured that out myself by now, but I'm gonna give you the points anyway :-).
0
 
Michel PlungjanIT ExpertCommented:
Thanks - decent of you ;-)

Michel
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.