[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to open an ASP file in a DIV

Posted on 2002-06-24
9
Medium Priority
?
245 Views
Last Modified: 2011-10-03
I open an asp file by clicking on a menu choice, when I do so, the file opens in a Frame.  Is it possible to have the asp file open in a DIV in the frame instead of the entire frAMe?
Thanks in advance
0
Comment
Question by:Chris_m
[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
9 Comments
 
LVL 2

Expert Comment

by:ManuelMSP
ID: 7103264
I don't think it is possible, because DIV is used on the Client side while an ASP page has to be processed on the server and has to be send back as HTML to to client.
0
 
LVL 22

Accepted Solution

by:
CJ_S earned 200 total points
ID: 7103267
For Netscape you can using
document.layers["layername"].load("url", 500);

for IE you'll have to tweak. You'll have to create a hidden iframe and after done loading you copy the contents into the DIV

<iframe id="if1" name="if1" style="visibility:hidden;"></iframe>
<div id="mydiv" style="position:absolute;top:100px;left:100px;width:100px;height:200px;"></div>

Following script will load a page:
function loadit(sURL)
{
   if(document.layers) document.layers["mydiv"].load(sURL, 500);
   else
   {
      document.if1.location = sURL;
   }
}

In the url that you load you put:
function document_onload()
{
   if(document.layers) return;
   top.document.mydiv.innerHTML = document.body.innerHTML;
}
window.onload=document_onload;

That should do the trick.

CJ
0
 

Author Comment

by:Chris_m
ID: 7103338
Hello CJ
I get the asp page displaying in the iframe ok, but thereafter I seem to have a problem.  When you say: "In the url that you load you put:..." do you mean that I include that function in the asp file?
Regards

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 22

Expert Comment

by:CJ_S
ID: 7103356
Yes.

CJ
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7103359
0
 
LVL 5

Expert Comment

by:kcm76
ID: 7103421
CJ:
it is not opening in my browser

0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7103476
kcm76,
what browser? Should work properly on IE4+, NS4+ on PC and Macintosh.

CJ
0
 
LVL 5

Expert Comment

by:kcm76
ID: 7103503
opera 6.01
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7103541
Then I suggest you turn on popup windows ;-)
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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

656 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