Click to See Complete Forum and Search --> : javascript question


aqeel
01-03-2003, 05:42 AM
there is a text box(a) and a text area(b) control on my web page, when a user types a url in (a) and press button, i want my javascript code to load that page and put its html source code in text area(b), but I'm not sure how I can do it. someone told me its possible with WebBrowser control, but how?

khalidali63
01-03-2003, 06:01 AM
Use MS Internet Transfer Control

such as
Dim net as Inet

then use its method OpenUrl

net.OpneUrl("www.google.com");

This should guide you

cheers

Khalid

aqeel
01-03-2003, 06:21 AM
how can I use Inet control in javascript, i'm using a floating frame and loading new page in it, now how can I get source code of that Iframe, i need source code, innerHTML and outerHTML are just returning source of IFrame object not the document object within it, and I also tried IFrame.document.body.outerHTML

khalidali63
01-03-2003, 06:27 AM
Hold on there?
You mentioned "WebBrowser" control in your questions post,that leads to conclusion that you are using Visual Basic programming to work with your web pages.And if you are not using VB then it wont be possible or at least I have never heard of JavaScript reading a URL and spitting out raw html.

Korry couldn't be a help

Khalid

aqeel
01-03-2003, 06:49 AM
but I'm already using WebBrowser Control in my asp page:

<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
</OBJECT>

<script>
WebBrowser1.navigate2("http://www.google.com/");
while (WebBrowser1.Busy) {

}
while (WebBrowser1.document.readyState!="complete" ) {
}
alert(WebBrowser1.document.body.outerHTML); // this alert is not showing what I want!!!!

</script>

khalidali63
01-03-2003, 07:15 AM
I am neither an ASP developer at all ( nor I want to..*_* ), I can not tell you how to import Inte object in an html page, however I can tell you that you can read the URL using Inet with syntax I posted earlier,you are better off posting your question in VB/ASP forum or waite along untill some one with ASP knowledge reads thi sthread and lets you know..

cheers

Khalid