/    Sign up×
Community /Pin to ProfileBookmark

javascript question

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?

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@khalidali63Jan 03.2003 — 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
Copy linkTweet thisAlerts:
@aqeelauthorJan 03.2003 — 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
Copy linkTweet thisAlerts:
@khalidali63Jan 03.2003 — 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
Copy linkTweet thisAlerts:
@aqeelauthorJan 03.2003 — 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>
Copy linkTweet thisAlerts:
@khalidali63Jan 03.2003 — 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
×

Success!

Help @aqeel spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...