• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 256
  • Last Modified:

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.
0
nrico
Asked:
nrico
  • 8
  • 2
  • 2
  • +1
1 Solution
 
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
 
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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
 
Michel PlungjanIT 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
 
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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

  • 8
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now