/    Sign up×
Community /Pin to ProfileBookmark

Searching Another Webpage

I’m currently trying to create a script which can grab the HTML from a web page and store it. For example, if I want to use google and search for the term “dogs”, I want to be able to access that information.

How can I implement this in JavaScript, if at all?

Thanks.

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@WolfShadeFeb 15.2011 — I think there is a way (in JavaScript) to get and store the HTML of another page into a variable (kind of like "screen scraping"); but it (obviously) isn't permanent - you'd need either a database (which JavaScript AFAIK cannot DIRECTLY interact with) or save it to a flat file on the server/local computer (I'm not familiar with JavaScript handling files.)

In certain circumstances, it can be considered "stealing", so it is frowned upon for the most part.

I think that AJaX would be the best way to do it.

http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

^_^
Copy linkTweet thisAlerts:
@KorFeb 15.2011 — Why don't you use straight the Google's Custom Search widget?

http://www.google.com/cse/
Copy linkTweet thisAlerts:
@RACHEL123Feb 15.2011 — Hi EVERYONE

I have a page where javascript is embedded in the html page with onchange()

event where a change in the text box calls for a calucalte function I have and it works fine when I try to isolate the Js into a separate file the onchage() stops working.can you pleasse point me in the right direction why this is happening?thank you in advance.
Copy linkTweet thisAlerts:
@KorFeb 15.2011 — Hi EVERYONE

I have a page where javascript is embedded in the html page with onchange()

event where a change in the text box calls for a calucalte function I have and it works fine when I try to isolate the Js into a separate file the onchage() stops working.can you pleasse point me in the right direction why this is happening?thank you in advance.[/QUOTE]

Welcome to the forum! But, please, don't hijack somebody else's Thread? Open a New Thread of your own (see the button New Thread on the top-left of the Forum), and put your problem there. Let's not mess-up the threads ?
×

Success!

Help @jaxbandicoot 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 5.14,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...