Grabbing info from a link, and modifying an ajax script request
This is way above me. I can't blame anyone for ignoring this, but the end result would be very cool. I have a site, mimictrading - com and track several portfolios. One thing I do for most of them, and makes it easy to update, is keep a link to a finviz screener page. I can add to and remove ticker symbols from the link as needed.
What I want is to be able to display stock quotes on the lefthand column, drawing from that finviz link so there's only one thing I need to update whenever a portfolio change is made.
After a lot of searching, I'm going to have to sort of mash something together. First there's an ajax that can load data from google finance. It's designed to show a single stock, but by comma delimiting the ticker request, you can get as many as you need in a single request. What it needs is a loop to properly create a div for each stock.
found here: http://www.aaronjwhite.org/index.php...e-stock-ticker
It uses/requires jquery. And further instruction is "remember to put a div on the the page with css class stockTick". I need that div to contain in a list all of the stocks in the request.
var stockInfo = response;
var stockString ='<div class="stockWrapper">STOCK:';
stockString +='<span class="stockSymbol">'+stockInfo.t+'</span>';
stockString +='<span class="stockPrice">'+stockInfo.l+'</span>';
stockString +='<span class="stockChange">'+stockInfo.c+'</span>';
stockString +='<span>at</span> <span class="stockTime">'+stockInfo.ltt+'</span>';
It would get that list from a finviz link on the page, it would search links on the page for finviz.com and then parse out the tickers. It wouldn't have to do each individual, because the request is also comma delimited, so it would just need the string from first to last ticker symbol, then plugged into the request line in the code above.