Posts

Showing posts with the label Javascript

Get Stock Quotes with Yahoo! Query Language (YQL)

Code <b>Result</b> <div id="yqlResult"></div> <script> // prepare the request var yqlUrl = "http://query.yahooapis.com/v1/public/yql"; // this query will retrieve the Name, Symbol and LastTradePriceOnly for Semb Corp, CDL HTrust and Sheng Siong var yqlQuery = encodeURIComponent("select Name, Symbol, LastTradePriceOnly from yahoo.finance.quote where symbol in ('U96.SI','J85.SI','OV8.SI')"); var format = "json"; var env = encodeURIComponent("store://datatables.org/alltableswithkeys"); var request = yqlUrl + "?q=" + yqlQuery + "&format=" + format + "&env=" + env; // initialize the XMLHttpRequest object var xmlhttp; if (window.XMLHttpRequest) { // for new browsers xmlhttp=new XMLHttpRequ

Popular posts from this blog

Long-Term Visit Pass - Plus (LTVP-PLUS)

Commission Calculator for DBS Vickers SG Stocks

How to Marry a Thai in Singapore