Results 1 to 2 of 2

Thread: [RESOLVED] Stock Ticker Yahoo

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2007
    Posts
    307

    Resolved [RESOLVED] Stock Ticker Yahoo

    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.

    Stock symbol changed to protect my identity

    Thanks

    Code:
    <html>
    <head>
    <META HTTP-EQUIV=Refresh CONTENT="60; URL=bottom.asp"> 
    <script> 
    function getQuote()
    {
      var Symbols="FO"
     
      var x = new ActiveXObject("MSXML2.XMLHTTP");
      arSymbols=Symbols.split(" ");
      var theQuotes="";
      x.Open("GET","http://finance.yahoo.com/d/quotes.csv?s=" + Symbols+"&f=sl1d1t1c1ohgv&e=.txt", false);
      x.Send();
      theQuotes=x.ResponseText;
        theQuotes= theQuotes.replace(/"/g,""); // remove double quotes
      
    
      var arQuoteLines=theQuotes.split("\n")
      var finalString="";
      var arTempLine=null; 
     
     
      var tmpString="";
      for(var i=0;i<arQuoteLines.length-1;i++)
      {
        arTempLine=arQuoteLines[i].split(",");
        tmpString+='My stock $' + arTempLine[2];
      }
     
      showQuotes.innerHTML=tmpString ;
    }
    
    </script>
    <title>None</title>
    <style>
    <%
    response.write "table{font-family: verdana, arial, sans-serif; font-size:22pt; color:'#ffffff'; background-color:'#000000'}"
    response.write "input{font-family: verdana, arial, sans-serif; font-size:24pt; color:'#ffffff'; background-color:'#000000'}"
    
    response.write "</style>"
    response.write "</head>"
    response.write "<body onload='getQuote();'>"
    
    response.write "<table  width='100%' height='100%'border=0><tr>" 
    Response.Write "<tr class=Color1>"
     
    Response.Write "<td align=left width='1%'>"
    Response.Write "</td>"
    Response.Write "<td align=left width='55%'>"
    Response.Write "<b>"
    response.write FormatDateTime(Date, 1) & "   " & left(Time, len(time) -6) & right(time, 2)
    Response.Write "</b>"
    
    Response.Write "</td>"
    
    Response.Write "<td align=right width='43%'>"
    Response.Write "<marquee id=showQuotes></marquee>"
    
    Response.Write "</td>"
    
    response.write "</tr>"
    response.write "</table>"
    %>
    </body></html>
    Last edited by melvin74; Sep 13th, 2007 at 08:45 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width