Click to See Complete Forum and Search --> : code to get info from other websites


karambos
09-08-2003, 05:51 AM
Hi,

I'm wondering if there's a way to code a webpage so that some of it's fields get filled with data from other webpages.

Say, for example, you want the most up-to-date share info to appear on a page you're designing and you know that this info appears on another page somewhere and you know where it is. How would one go about such a task?

I'm grateful for any hints or tips

Karambos

brendandonhue
09-08-2003, 06:09 AM
Not in javascript.

lillu
09-08-2003, 06:11 AM
Try XML.

Charles
09-08-2003, 06:22 AM
You'll need some sort of server side script, I'd use Perl and the LWP::Simple module, and you'll need some good legal council if that other site is copyrighted.

Khalid Ali
09-08-2003, 07:50 AM
Originally posted by lillu
Try XML.


XML????

How does XML initself will do anything???

XML in itself is just another fancy text file it does not have any ability to perform any processing,unless aided by some other attributory programming language.
Charles solution is the only solution,you may have choices like Java(JSP/Serlets) and ASP other then Perl,however his last comment is the key to this solution....


and you'll need some good legal council if that other site is copyrighted.

:p

karambos
09-09-2003, 07:04 AM
Thankyou for the replies.

Please excuse my ignorance, but why is it not possible in Javascript?

Thankyou again for your time.

Karambos

Khalid Ali
09-09-2003, 07:11 AM
JavaScript is a scripting languages,who's creators(netscape people) decided that there should be some limits to what JS should be able to do,just as humans have limits that if they go to space without any aid they may grow in volume(:D )....

Charles
09-09-2003, 07:13 AM
Originally posted by karambos
Thankyou for the replies.

Please excuse my ignorance, but why is it not possible in Javascript?

Thankyou again for your time.

Karambos For the same reason that JavaScript cannot turn out the lights in your room; it just cannot do that. JavaScript intentionally has very limited ability to interact with the outside world. Think about it. Would use a browser that would let web authors look into or perhaps erase all the files on your hard drive?

karambos
09-12-2003, 12:23 PM
I see. You're quite right - that could be dangerous

Would it not be possible to read in a whole web page as one big long string and parse it for the required fields using JS?

Thankyou

Karambois

Khalid Ali
09-12-2003, 12:47 PM
you can actually do that( however its a crude way of doing it)

you can get all child elements under HTML element

var htmlStr = document.getElementsByTagName("html")[0];