daemonkin
10-18-2010, 11:53 AM
Hi,
Looking to figure out why my simple page is not returning what I expect.
HTML:
<html>
<head>
<title>IBM Example</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<meta http-equiv="content-script-type" content="text/javascript">
</head>
<body>
<script type="text/javascript">
alert("Here");
$.getJSON("http://mylocalIP/~rmccallum/c/ibm-json.html?callback=?",
function(data) {
alert("Symbol: " + data.symbol + ", Price: " + data.price);
});
</script>
</body>
</html>
And the JSON file:
{'symbol': 'IBM', 'price': '91.42'}
The first alert is fired off but the second one in the JSON function does not work. Any thoughts?
D.
Looking to figure out why my simple page is not returning what I expect.
HTML:
<html>
<head>
<title>IBM Example</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<meta http-equiv="content-script-type" content="text/javascript">
</head>
<body>
<script type="text/javascript">
alert("Here");
$.getJSON("http://mylocalIP/~rmccallum/c/ibm-json.html?callback=?",
function(data) {
alert("Symbol: " + data.symbol + ", Price: " + data.price);
});
</script>
</body>
</html>
And the JSON file:
{'symbol': 'IBM', 'price': '91.42'}
The first alert is fired off but the second one in the JSON function does not work. Any thoughts?
D.