This sounds like the sort of thing that I was trying to do - read the page
and parse it out to get the information. However, I was never able to
actually get either a remote page's code or display information into a
variable. Yahoo does offer the information in a regular format, so if this
is possible then it may be my solution. Of course, the problem point is
that I am not yet knowledgeable with XML, so that solution may need to wait
until later this year when I get smart on the subject.
I have, however, pulled up the article you suggested and will see if it
helps. The server on which one of my websites is located is running IIS, so
perhaps there is a possibility there.
Cheers -
George L Smyth, Webmaster
U.S. Naval Academy Alumni Association
-----Original Message-----
From: philipsayers [mailto:philipsayers@a...]
Sent: Thursday, February 28, 2002 11:53 PM
To: javascript
Subject: [javascript] RE: Question About Stock Quotes
Look into something called screen-scraping
I'm not sure about how easy this is with javascript.
I know this can be done using an MS web server. Something called
ServerXMLHTTP.
If you can find a common format of how the stock information is
presented on Yahoo, then you can use Regular Expressions to scan the
HTML for the pattern you specify and pull out the stock info you need.
See
http://www.eggheadcafe.com/articles/20010114.asp
-----Original Message-----
From: George Smyth [mailto:george.smyth@U...]
Sent: Thursday, February 28, 2002 2:54 PM
To: javascript
Subject: [javascript] Question About Stock Quotes
I asked this question the other day, but with no response I didn't know
if
that meant that what I am trying to do is not possible, or if nobody has
any
ideas. I will post the query again for your consideration.
I've written a JavaScript program that allows people to enter, for
several
companies, a stock's current price, 52 week high, and 52 week low. From
the
information entered, I do some calculations and offer the results of
those
Calculations
(http://members.home.net/hmpi/drips/investmete/investmetepgm.htm).
Is there any way for me to automatically obtain this information?
Currently, I offer a popup with this information from Yahoo where they
can
manually copy it into the form. I am not currently conversant with XML,
and
am wondering if there is some way for me to get this information into
the
form, as I have been unable to figure this out (I am thinking that this
is
not possible).
Cheers -
George L Smyth
$subst('Email.Unsub').