ForumsDevelopersUsing API from Javascript?


Using API from Javascript?
Author Message
haeffb

Posted: Aug 10, 2009
Score: 0 Reference
Is possible?

I'm beginning to develop an application using Javascript, and have had no success using the XMLHttpRequest object. In searching the forums here, I found a mention that the XMLHttpRequest .open will fail if the Javascript is not on the same domain as the server. Does that mean that Javascript cannot be used to access the Toodledo API?
whitten

Posted: Aug 10, 2009
Score: 0 Reference
I haven't tested this lately, but there was something that toodledoo did recently to support cross domain scripting that might have an impact on your effort. The Toodledo Firefox extension is written in Javascript, but it is served from toodledoo's own server so it doesn't have to worry about cross domain scripting.
Jake

Toodledo Founder
Posted: Aug 11, 2009
Score: 0 Reference
As far as I know, XMLHttpRequest cannot work across domains, so I don't think it is possible. You'll need to create a bridge using some other programming language.
haeffb

Posted: Aug 21, 2009
Score: 0 Reference
FYI, for anyone interested, my question was related to using Javascript in WebOS (the Palm Pre). WebOS does allow their XMLHttpRequest (and, by extension, Prototype Ajax requests) calls to work across domains. Anyone developing for WebOS can use the Toodledo API even though the coding is done in Javascript.
You cannot reply yet

U Back to topic home

R Post a reply

To participate in these forums, you must be signed in.