473,394 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Real time link to data element

http://finance.yahoo.com/

offers a wide range of financial data.

Would anyone have (or know where I can get) a sample of code that

I can use to link to a specific element of data (e.g., Last Trade) on

http://finance.yahoo.com/ or similar Web site. I would like the information
to update as financial information changes (i.e., a "real time" link).

I have some experience with standard Web pages but no knowledge of
JavaScript, perhaps you could point me in the direction of a few resources
(Web articles, books, etc.) where I can learn to do the type of coding
required to

achieve this type of link.

The following is a part of the HTML code on http://finance.yahoo.com/ that
identifies "Last Trade" of "54.00"

Last Trade:</td><td class="yfnc_tabledata1"><big><b><span
id="yfs_l10_vlo">54.00</span></b></big></td></tr><tr><td
class="yfnc_tablehead1" width="48%">

Thanks!
Oct 26 '06 #1
9 1755
Leslie Coover wrote:
http://finance.yahoo.com/

offers a wide range of financial data.

Would anyone have (or know where I can get) a sample of code that

I can use to link to a specific element of data (e.g., Last Trade) on

http://finance.yahoo.com/ or similar Web site. I would like the information
to update as financial information changes (i.e., a "real time" link).

I have some experience with standard Web pages but no knowledge of
JavaScript, perhaps you could point me in the direction of a few resources
(Web articles, books, etc.) where I can learn to do the type of coding
required to

achieve this type of link.

The following is a part of the HTML code on http://finance.yahoo.com/ that
identifies "Last Trade" of "54.00"

Last Trade:</td><td class="yfnc_tabledata1"><big><b><span
id="yfs_l10_vlo">54.00</span></b></big></td></tr><tr><td
class="yfnc_tablehead1" width="48%">
So if the user has the page open for a long time, you want the 54.00 to
change as the data on Yahoo! finance changes?

One way to do this would be this. The browser requests the page from
your server. Your server gets the data from the Yahoo! finance site by
a web service or screen scraping. You serve the page to the browser
with this initial data. Using JavaScript, the browser occassionaly
makes AJAX requests to your server for updates to this element. (This
repetitive type of request is called polling.) Your server gets the
current data from the Yahoo! site. Then your server returns the new
value to the browser as the AJAX response. The JavaScript in the
browser changes the value in the HTML and then the user sees the
up-to-date value.

javascript: The Definitive Guide 5th Edition by Flanagan from O'Reilly
Section 15.7 (changing the contents of the document) and chapter 20
(AJAX).

After you read that you may want to check out an AJAX library like that
from Yahoo! UI or Matt Kruse. However by this point you will know how
to write your own ajax library minus the browser bugs.

Peter

Oct 26 '06 #2

Peter Michaux wrote:
Leslie Coover wrote:
http://finance.yahoo.com/

offers a wide range of financial data.

Would anyone have (or know where I can get) a sample of code that

I can use to link to a specific element of data (e.g., Last Trade) on

http://finance.yahoo.com/ or similar Web site. I would like the information
to update as financial information changes (i.e., a "real time" link).
[...]
One way to do this would be this. The browser requests the page from
your server. Your server gets the data from the Yahoo! finance site by
a web service or screen scraping.
[...]
After you read that you may want to check out an AJAX library...
And if it is made available in a web page for your visitors, you may
want to find a good lawyer - commercial sites don't nomally like you
using their content without an agreement and probably payment. :-)

--
Rob

Oct 26 '06 #3
Thanks for reply

So (for sure) I can get this real-time data to my own Web site using
JavaScript?

What is ASP VBScript and ASP.NET all about?

A (probably more difficult, but actually better) option (for me) would be to
"script" directly into an MS Access db (on PC, no server issues). Do you
know anything about this? I know some Visual Basic code, could it be used
with some "scripting language"? I know very little about this but I am
assuming one can use JavaScript, ASP VBSScript and ASP.NET with HTML to do
various things, but I have no idea which works best for what, if they can be
used with code such as Visual Basic, or if there are other code sets that
are more effective.

Since I will need to put a lot of time and effort into leaning new codes I'd
like to set off on the right path, do you have any other suggestions besides
learning JavaScript? The reason scripting into MS Access would be better is
because it would make a better analysis tool, my objective is to analyze
financial data. But, if that is just too complicated I would settle for
"collecting" the data on my Web site.
"Peter Michaux" <pe**********@gmail.comwrote in message
news:11*********************@b28g2000cwb.googlegro ups.com...
Leslie Coover wrote:
>http://finance.yahoo.com/

offers a wide range of financial data.

Would anyone have (or know where I can get) a sample of code that

I can use to link to a specific element of data (e.g., Last Trade) on

http://finance.yahoo.com/ or similar Web site. I would like the
information
to update as financial information changes (i.e., a "real time" link).

I have some experience with standard Web pages but no knowledge of
JavaScript, perhaps you could point me in the direction of a few
resources
(Web articles, books, etc.) where I can learn to do the type of coding
required to

achieve this type of link.

The following is a part of the HTML code on http://finance.yahoo.com/
that
identifies "Last Trade" of "54.00"

Last Trade:</td><td class="yfnc_tabledata1"><big><b><span
id="yfs_l10_vlo">54.00</span></b></big></td></tr><tr><td
class="yfnc_tablehead1" width="48%">

So if the user has the page open for a long time, you want the 54.00 to
change as the data on Yahoo! finance changes?

One way to do this would be this. The browser requests the page from
your server. Your server gets the data from the Yahoo! finance site by
a web service or screen scraping. You serve the page to the browser
with this initial data. Using JavaScript, the browser occassionaly
makes AJAX requests to your server for updates to this element. (This
repetitive type of request is called polling.) Your server gets the
current data from the Yahoo! site. Then your server returns the new
value to the browser as the AJAX response. The JavaScript in the
browser changes the value in the HTML and then the user sees the
up-to-date value.

javascript: The Definitive Guide 5th Edition by Flanagan from O'Reilly
Section 15.7 (changing the contents of the document) and chapter 20
(AJAX).

After you read that you may want to check out an AJAX library like that
from Yahoo! UI or Matt Kruse. However by this point you will know how
to write your own ajax library minus the browser bugs.

Peter

Oct 26 '06 #4
"Leslie Coover" <lc******@cox.netwrote in
news:PF************@newsfe15.lga:
A (probably more difficult, but actually better) option (for me) would
be to "script" directly into an MS Access db (on PC, no server
issues).
So, what you *really* want to do is collect the information in a DB. In
that case, forget about Javascript--you will be better off using a server-
side scripting language such as ASP or PHP or ColdFusion. Those languages
offer direct access to the web (to scrape the number you want off Yahoo's
page) as well as direct access to a DB (to store the number). You'd set it
up to "poll" Yahoo as mentioned above, and just let the numbers dribble
into your DB.
Oct 26 '06 #5
RobG wrote:
Peter Michaux wrote:
Leslie Coover wrote:
http://finance.yahoo.com/
>
offers a wide range of financial data.
>
Would anyone have (or know where I can get) a sample of code that
>
I can use to link to a specific element of data (e.g., Last Trade) on
>
http://finance.yahoo.com/ or similar Web site. I would like the information
to update as financial information changes (i.e., a "real time" link).
[...]
One way to do this would be this. The browser requests the page from
your server. Your server gets the data from the Yahoo! finance site by
a web service or screen scraping.
[...]
After you read that you may want to check out an AJAX library...

And if it is made available in a web page for your visitors, you may
want to find a good lawyer - commercial sites don't nomally like you
using their content without an agreement and probably payment. :-)
I'm innocent. I was just answering the question. :)

Peter

Oct 26 '06 #6
Leslie Coover wrote:
>
Since I will need to put a lot of time and effort into leaning new codes I'd
like to set off on the right path, do you have any other suggestions besides
learning JavaScript?
Don't mess with ASP, PHP, etc for the server side. Use Ruby on Rails.
Don't use the JavaScript that comes as part of Rails. Don't even use it
when it starts to look easy and friendly.

Alternatives for Ruby/Rails are Perl/Catalyst or Python/TurboGears.
However Rails is the original and the others are probably further
behind in development. I haven't tried them

Don't mess with Flash on the client side. Just use HTML/CSS/JavaScript.

Use MySql or Postgre for the database. I haven't used Postgre but the
Postgre people definitely think they are better then the MySql people.

Get the Pragmatic Programmers books for Ruby and for Ruby on Rails.
Get the O'Reilly books for HTML, CSS and JavaScript.

Make sure you validate your HTML, CSS and use jslint.com to check your
JavaScript.
-Peter

Oct 26 '06 #7
Peter Michaux said the following on 10/26/2006 2:11 AM:
Leslie Coover wrote:
>Since I will need to put a lot of time and effort into leaning new codes I'd
like to set off on the right path, do you have any other suggestions besides
learning JavaScript?

Don't mess with ASP, PHP, etc for the server side. Use Ruby on Rails.
Biased are we?
Don't use the JavaScript that comes as part of Rails. Don't even use it
when it starts to look easy and friendly.
Absolutely.
Alternatives for Ruby/Rails are Perl/Catalyst or Python/TurboGears.
However Rails is the original and the others are probably further
behind in development. I haven't tried them
Then how can you say they are "probably behind"? They may be, they may
not be but without ever seeing them you can't even proposition which is
true.

If your argument for Ruby is that it was first, then you should be
biased towards ASP on the server as it was first.....
Don't mess with Flash on the client side. Just use HTML/CSS/JavaScript.
And worry with all the browser differences? Flash doesn't suffer that
limitation.
Get the O'Reilly books for HTML, CSS and JavaScript.
Not sure about the HTML and CSS, but if the O'Reilly books on CSS and
HTML are of the same quality as the O'Reilly book on JS then avoid all
three of them. The least bad JS book out is David Flanagan, as referred
to in the group FAQ.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Oct 26 '06 #8
Randy Webb wrote:
Peter Michaux said the following on 10/26/2006 2:11 AM:
Leslie Coover wrote:
Since I will need to put a lot of time and effort into leaning new codes I'd
like to set off on the right path, do you have any other suggestions besides
learning JavaScript?
Don't mess with ASP, PHP, etc for the server side. Use Ruby on Rails.

Biased are we?
Yes. I've tried some other ways of developing web pages (Perl and PHP)
and like Rails the best.

Alternatives for Ruby/Rails are Perl/Catalyst or Python/TurboGears.
However Rails is the original and the others are probably further
behind in development. I haven't tried them

Then how can you say they are "probably behind"? They may be, they may
not be but without ever seeing them you can't even proposition which is
true.
I have looked at TurboGears briefly. It looks like it is behind and in
certain areas may never catch up because Python doesn't have certain
features Ruby does. These Ruby features are part of what gives Rails
it's magic. There are probably things in TurboGears that are better
than Rails. Perl is older so I imagine that it would have an even
harder time competing with Ruby. There are Cake and other similar PHP
frameworks to consider too. They are all cloning Rails for a reason.
I'm sure someone will out do Rails soon or have already but the huge
Rails community examining the code and improving it is an important
part of picking it as a framework.

Peter

Oct 26 '06 #9

"Jim Land" <RrrrFfffTttt(NO)@(SPAM)hotmail.comwrote in message
news:Xn*********************************@216.168.3 .44...
"Leslie Coover" <lc******@cox.netwrote in
news:PF************@newsfe15.lga:
>A (probably more difficult, but actually better) option (for me) would
be to "script" directly into an MS Access db (on PC, no server
issues).

So, what you *really* want to do is collect the information in a DB. In
that case, forget about Javascript--you will be better off using a server-
side scripting language such as ASP or PHP or ColdFusion. Those languages
offer direct access to the web (to scrape the number you want off Yahoo's
page) as well as direct access to a DB (to store the number). You'd set
it
up to "poll" Yahoo as mentioned above, and just let the numbers dribble
into your DB.
Correct

I know the word "scripting" is a very general word in IT, I may be misusing
it.
Is there one scripting language that you would recommend that would work

with MS Access (i.e., VBA) to create interconnectivity to remote

Web sites, somewhat like the relationship between HTML and JavaScript?

If I want to concentrate on one language should I choose ASP, PHP,
Coldfusion or

VBScript or something else?

I plan to use this at home, my connection to the Internet is through a

local service provider.

Thanks!
Oct 27 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stanimir Stamenkov | last post by:
Here's an example: <form action="bogus" method="post"> <p> <a href="prev.cgi"><input type="submit" name="prev" value="< Back"></a> <a href="next.cgi"><input type="submit" name="next"...
4
by: WittyGuy | last post by:
Hi all, Though I know the concepts of both abstract class & virtual function (like derived class pointer pointing to base class...then calling the function with the pointer...), what is the real...
3
by: RobG | last post by:
A little while ago I opined that do/while loops are harder to read than for loops, and therefore I preferred using for loops. However, it was pointed out that do/while has significant...
12
by: Russ | last post by:
I'm interested in setting up a web page where live data can be displayed in real-time on the web page. For example: I would like to display a (nice looking) graph of some data value versus time...
30
by: Raymond Hettinger | last post by:
Proposal -------- I am gathering data to evaluate a request for an alternate version of itertools.izip() with a None fill-in feature like that for the built-in map() function: >>> map(None,...
7
by: Fred Exley | last post by:
I have a traditional application using a database and procedural code that works fine. I'm re-writing it using the OOP methodology, just to see how this may be the better way to do things. I...
4
by: Henry | last post by:
Does anybody have a real-world sample of buiding a treeview control using data from database tables? All the sample code I have found either builds the treeview manually or uses a file directory...
10
by: Martin Hughes | last post by:
Hi guys, I was wondering if anyone could give me some advice. I am looking to develop an ASP.NET application that will enable several workstations to access real time telemetry data received...
0
by: Kurt Mueller | last post by:
Am 08.10.2008 um 06:59 schrieb Hendrik van Rooyen: OK, this is gives an impression of SPEED. In your application the REAL-TIME requirements are isolated and implemented in the custom...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.