See Screenshots
Home
Tour
Plans & Pricing
Happy Customers
The Intervals Story
Case Studies
Blog
FAQ
Login
Text
Discussions
|
Categories
|
Forum Search
|
Not signed in (
Sign In
)
The Intervals Forum
Categories
All unblocked categories
Announcements
Intervals Roadmap and Release Notes
Feature Requests
New to Intervals? Have questions or need help?
Ways to use Intervals
Tips & Tricks
API
Feeds
RSS2
Welcome Guest!
Want to take part in these discussions? If you have an account,
sign in now
.
If you don't have an account,
apply for one now
.
API
jquery script to access api
Bottom of Page
1 to 2 of 2
CommentAuthor
tilleythetoon
CommentTime
Aug 3rd 2010
Hi
I'm trying to use jquery to access the api and return data this is what I have so far:
<script>
$.ajax({
type: 'GET',
url: 'https://api.myintervals.com/me/',
data: '{Accept: application/xml, Authorization: Basic base64encodedkey}',
dataType: 'xml',
success: parseXml
});
function parseXml(xml)
{
alert('I am here');
}
</script>
My knowledge of javascript programming is limited any help would be greatly appreciated
CommentAuthor
jprado
CommentTime
Aug 9th 2010
edited @ 08/09/2010 9:55 am
JavaScript won't work with that example because the XMLHttpRequest cannot make requests across different domains.
There are ways for it to work using a proxy, but in general JavaScript by itself will not work.
Here is an example of a proxy written in php
http://developer.yahoo.com/javascript/samples/proxy/php_proxy_simple.txt
1 to 2 of 2