Connecting Tech Pros Worldwide Forums | Help | Site Map

Stock Ticker

Newbie
 
Join Date: Sep 2007
Posts: 2
#1: Sep 13 '07
At work we have a couple flat screens that display news and current stock info. About a week ago it stopped displaying the marquee for the stock info.

Curious if anyone had any suggestions on what might of changed.
Perhaps something changed at yahoo,,,,

Stock symbol changed to protect my identity :)

Thanks
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <META HTTP-EQUIV=Refresh CONTENT="60; URL=bottom.asp"> 
  4. <script> 
  5. function getQuote()
  6. {
  7.   var Symbols="FO"
  8.  
  9.   var x = new ActiveXObject("MSXML2.XMLHTTP");
  10.   arSymbols=Symbols.split(" ");
  11.   var theQuotes="";
  12.   x.Open("GET","http://finance.yahoo.com/d/quotes.csv?s=" + Symbols+"&f=sl1d1t1c1ohgv&e=.txt", false);
  13.   x.Send();
  14.   theQuotes=x.ResponseText;
  15.     theQuotes= theQuotes.replace(/"/g,""); // remove double quotes
  16.  
  17.  
  18.   var arQuoteLines=theQuotes.split("\n")
  19.   var finalString="";
  20.   var arTempLine=null; 
  21.  
  22.  
  23.   var tmpString="";
  24.   for(var i=0;i<arQuoteLines.length-1;i++)
  25.   {
  26.     arTempLine=arQuoteLines[i].split(",");
  27.     tmpString+='My stock $' + arTempLine[2];
  28.   }
  29.  
  30.   showQuotes.innerHTML=tmpString ;
  31. }
  32.  
  33. </script>
  34. <title>None</title>
  35. <style>
  36. <%
  37. response.write "table{font-family: verdana, arial, sans-serif; font-size:22pt; color:'#ffffff'; background-color:'#000000'}"
  38. response.write "input{font-family: verdana, arial, sans-serif; font-size:24pt; color:'#ffffff'; background-color:'#000000'}"
  39.  
  40. response.write "</style>"
  41. response.write "</head>"
  42. response.write "<body onload='getQuote();'>"
  43.  
  44. response.write "<table  width='100%' height='100%'border=0><tr>" 
  45. Response.Write "<tr class=Color1>"
  46.  
  47. Response.Write "<td align=left width='1%'>"
  48. Response.Write "</td>"
  49. Response.Write "<td align=left width='55%'>"
  50. Response.Write "<b>"
  51. response.write FormatDateTime(Date, 1) & "   " & left(Time, len(time) -6) & right(time, 2)
  52. Response.Write "</b>"
  53.  
  54. Response.Write "</td>"
  55.  
  56. Response.Write "<td align=right width='43%'>"
  57. Response.Write "<marquee id=showQuotes></marquee>"
  58.  
  59. Response.Write "</td>"
  60.  
  61. response.write "</tr>"
  62. response.write "</table>"
  63. %>
  64. </body></html>
  65.  

Newbie
 
Join Date: Sep 2007
Posts: 2
#2: Sep 13 '07

re: Stock Ticker


Nevermind i got it. Looks like yahoo changed the order of the information and where it was coming from.

Worked with download.finance etc.
Newbie
 
Join Date: Aug 2008
Posts: 1
#3: Aug 14 '08

re: Stock Ticker


There are companies who specialize in providing financial content for websites. For example, AlphaTrade E-Trax. Stock market information for websites may have real time streaming stock quotes, market news, company news and events. As an option they provide stock charts, currency converter, option chains, etc.
Reply


Similar ASP / Active Server Pages bytes