Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Grab some text from a webpage and display it on yours
Old 05-31-2010, 08:12 PM Grab some text from a webpage and display it on yours
Junior Talker

Posts: 3
Trades: 0
Hello,
is it possible somehow to grab just some text from a table in a remote website, and display it on your site, like for example the weather temperature displayed on a weather site, and display it on my site where I want..

I am asking this because I am sure there is a service on the web that allows you to build a widget that display exactly the data you selected from a remote website..but i lost the link, and i need it now..

thank you.
Eian00 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-02-2010, 07:50 AM Re: Grab some text from a webpage and display it on yours
Extreme Talker

Posts: 246
Trades: 0
You want to find a weather service that has a web service that they allow you to use. Then you can do what you need. But as for using javascript to get information from a table on another site, no not possible.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
Reply With Quote
View Public Profile
 
Old 06-02-2010, 08:59 AM Re: Grab some text from a webpage and display it on yours
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Quote:
Originally Posted by Eian00 View Post
I am asking this because I am sure there is a service on the web that allows you to build a widget that display exactly the data you selected from a remote website..
I'm sure there's tons of "widgets" like this all over the web, but you can't build a general script with JavaScript that is allowed to read the content of remote pages. JavaScript is not allowed to do this, for security reasons, the reasoning being, since JavaScript operates in the client (browser), if it were allowed to scrape information from remote pages, it could read information from sites that users could be logged into. This would be very bad.

The script you are thinking of was probably written to get information from a specific site. And it was probably hosted on that site, which means the external site would be able to control its content from the server. Then, if a third party linked to it, they would be allowed access to any content allowed through the API.

If you want to scrape content from a site, you should write a server-side script that does this. Server side scripts create their own HTTP requests instead of using the browser, and aren't subject to the same security restraints as JavaScript.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Reply     « Reply to Grab some text from a webpage and display it on yours
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.33990 seconds with 12 queries