Hi,
Could you try the revised script which is attached?
One reason why you could not see data was because the invokeXigniteHistorical function was not being executed.
I added it to the onLoad function of the body tag.
Plus, I think you should change data.response to response. There is no object called data though there is an object called response.
Do let us know how it goes.
please also remember that we have used console.log statements to display data.
Which means you will not see the data on screen but in the console - you can view the console in Firefox using the Firebug addon.
If you wish you see it as an alert just replace the console.log with alert
Hope this helps.



Hi,
I'm trying to use the documentation for the javascript API and I am missing something. Why does this not work? I am expecting the values to be returned and displayed on the browser. I've tried the same parameters--I registered and got my own username and password with XIgnite--in Wires and it works as expected. Thanks!
<html>
<head>
<title>Samples Page with Presto Connect</title>
</head>
<body>
<script language="javascript" src="http://localhost:8080/static/common/js/prototype/prototype-1.6.0.js"></script>
<script language="Javascript" src="http://localhost:8080/static/common/js/presto-util.js"></script>
<script language="Javascript" src="http://localhost:8080/static/common/js/presto-connect.js"></script>
<script language="Javascript" type"text/Javascript">
prestoUrl = "/presto";
var connection = new Presto.Connection({username: 'admin', password: 'adminadmin'});
function invokeXigniteHistorical() {
connection.request({ //request configuration
sid: 'XigniteHistorical',
oid: 'GetHistoricalQuotesAsOf',
header: {
serviceHeader: {
"ser:header": {
"ser:Username": "mysuername@aol.com"
"ser:Password": "mypassword"
}
}
},
//input parameters
params: {
"ser:GetHistoricalQuotesAsOf": {
"ser:Identifier": "GOOG",
"ser:IdentifierType": "Symbol",
"ser:EndDate": "10/7/2009",
}
}
},
{ //callback
onSuccess: function(response) {
console.log('XigniteHistorical response = ');
console.log(data.response);
alert('XigniteHistorical success');
},
onFailure: function(err) {
alert('XigniteHistorical failure = ' + err.message);
},
scope: this
});
}
</script>
</body/
</html>