Connecting Tech Pros Worldwide Forums | Help | Site Map

load external html vs 2005

Jeff Allan
Guest
 
Posts: n/a
#1: Nov 30 '06
Hello,

I am trying to load an external HTML page into a DIV tag with .NET 05 and I
can't figure it out. Any suggestions?

My Scenario:
- Gridview populated with list of available files
- I can get the external page to load in a new window just fine
- I would like the detail to show on the same page, below the list.
- I can't use the detail control and dynamically create the page as these
pages are compiled and stored on the server for archive purposes.



Kodali Ranganadh
Guest
 
Posts: n/a
#2: Nov 30 '06

re: load external html vs 2005


Hi .. Try with Ajax XMLHTTP Request Browser activeX object for filling
the HTML page into the div tag.
Example :


<script language="javascript" type="text/javascript">


var xmlHttp;
function Button1_onclick() {
if(window.ActiveXObject)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
else if(Window.XmlHttpRequest)
{
xmlHttp=new XMLHttpRequest();
}
xmlHttp.open("GET","http://www.itoncorp.com",true);
xmlHttp.onreadystatechange=doUpdate;
xmlHttp.send();
}
function doUpdate()
{
var t= document.getElementById("divid");
if (xmlHttp.readyState==4) {
t.innerHTML=xmlHttp.responseText;
}
}


</Script>


The above script get the www.itoncorp.com html page using the ajax and
then fill this page into the div named "divid". Iw works good.
But the main desedvantage to use this method's is, it just replace the
InnerHTML with the itoncorp.com HTML page, But it does't get the fill
the images and other resources

U can use IFrames .. this also act's like a webBrowser.. May be it will
be sutable for get native view for the webpage u requested..

all the best ..

On Nov 30, 8:36 am, "Jeff Allan" <bookp...@community.nospamwrote:
Quote:
Hello,
>
I am trying to load an external HTML page into a DIV tag with .NET 05 and I
can't figure it out. Any suggestions?
>
My Scenario:
- Gridview populated with list of available files
- I can get the external page to load in a new window just fine
- I would like the detail to show on the same page, below the list.
- I can't use the detail control and dynamically create the page as these
pages are compiled and stored on the server for archive purposes.
Jeff Allan
Guest
 
Posts: n/a
#3: Nov 30 '06

re: load external html vs 2005


Hello Kodali,
Thanks for your response, I will give this a try!
Jeff

"Kodali Ranganadh" <kodaliranganadh@gmail.comwrote in message
news:1164870692.373367.119680@14g2000cws.googlegro ups.com...
Quote:
Hi .. Try with Ajax XMLHTTP Request Browser activeX object for filling
the HTML page into the div tag.
Example :
>
>
<script language="javascript" type="text/javascript">
>
>
var xmlHttp;
function Button1_onclick() {
if(window.ActiveXObject)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
else if(Window.XmlHttpRequest)
{
xmlHttp=new XMLHttpRequest();
}
xmlHttp.open("GET","http://www.itoncorp.com",true);
xmlHttp.onreadystatechange=doUpdate;
xmlHttp.send();
}
function doUpdate()
{
var t= document.getElementById("divid");
if (xmlHttp.readyState==4) {
t.innerHTML=xmlHttp.responseText;
}
}
>
>
</Script>
>
>
The above script get the www.itoncorp.com html page using the ajax and
then fill this page into the div named "divid". Iw works good.
But the main desedvantage to use this method's is, it just replace the
InnerHTML with the itoncorp.com HTML page, But it does't get the fill
the images and other resources
>
U can use IFrames .. this also act's like a webBrowser.. May be it will
be sutable for get native view for the webpage u requested..
>
all the best ..
>
On Nov 30, 8:36 am, "Jeff Allan" <bookp...@community.nospamwrote:
Quote:
>Hello,
>>
>I am trying to load an external HTML page into a DIV tag with .NET 05 and
>I
>can't figure it out. Any suggestions?
>>
>My Scenario:
>- Gridview populated with list of available files
>- I can get the external page to load in a new window just fine
>- I would like the detail to show on the same page, below the list.
>- I can't use the detail control and dynamically create the page as these
>pages are compiled and stored on the server for archive purposes.
>

Closed Thread