Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Load HTML into <DIV>

Posted on 2000-04-03
13
Medium Priority
?
251 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
The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

 
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 400 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

688 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