0

Hello everyone,

I am trying to write a website that allows a user to input a stock symbol(ie. APPL, GOOG) and get basic information back. I have a html/js file and how it looks is fine but I am running into trouble when doing an HTTP GET using the XMLHttpRequest. I've test the URL in the browser several times and it works great and displays the JSON that I would like to be getting. At this point I've looked at numerous tutorials and have asked others before and have not found a solution. I've done this before in Java and it worked like a charm so I don't understand what is so hard about this. Here is my breif code below. Does anyone see anything wrong or can you offer any tips? All suggestions would be greatly appreciated!

var textValue = document.getElementById("stockTextBox").value;
    var request = null;

    var urlEncoded = "http://www.finance.yahoo.com/webservice/v1/symbols/" + textValue.toString() + "/quote?format=json";

    request = new XMLHttpRequest();

    request.open("GET", urlEncoded, false);
    request.send(null);
    alert(request.status());
2
Contributors
1
Reply
10
Views
3 Years
Discussion Span
Last Post by LastMitch
0

At this point I've looked at numerous tutorials and have asked others before and have not found a solution.

@tastybrownies

That is correct, there is no solution you need a api feed or a widget (add on) to do this.

For example:

http://dev.markitondemand.com/

Edited by LastMitch

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.