Hi,
I am creating a simple hello world application where I want to show
the stock quotes of certain shares using google finance api for
javascript.
But I am getting an error as google.finance.Quote is null or not an
object.The code of my file is shown below-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/
>
<title>My Google Data API Application</title>
<Module>
<ModulePrefs title="hellofinance">
<Require feature="finance"/>
</ModulePrefs>
<script src="
http://www.google.com/jsapi?
key=ABQIAAAAZld_9jFNiB1SDEPB12bCpBTwM0brOpm-
All5BF6PoaKBxRWWERRhZSyb0ajWqfjH9EUjYlnzSjdqqA" type="text/
javascript"></script>
<script type="text/javascript">
//<![CDATA[
google.setOnLoadCallback(getMyFeed);
google.load("gdata", "1");
function getMyFeed() {
var quote = new google.finance.Quote();
quote.enableDomUpdates( { 'GOOG' : '_IG_SYM1', 'AAPL' :
'_IG_SYM2',
'INTC' : '_IG_SYM3' } );
quote.getQuotes(["GOOG", "AAPL", "INTC"]);
}
//]]>
</script>
</Module>
</head>
<body>
<div id="panel"/>
Hello world!
Here is your portfolio:<br/>
GOOG: <span id=_IG_SYM1_l></span> (<span id=_IG_SYM1_c></span>)<br/>
AAPL: <span id=_IG_SYM2_l></span> (<span id=_IG_SYM2_c></span>)<br/>
INTC: <span id=_IG_SYM3_l></span> (<span id=_IG_SYM3_c></span>)<br/>
</body>
</html>
How can I solve this issue?