Embedding Zotero API request on my Website
Dear all,
thanks to the latest addition to the Zotero web api (http://www.zotero.org/support/dev/server_api) we are now able to retrieve nice and formatted lists of references by calling the REST API including format=bib&content=bib.
But could someone please help me in creating some javascript to put on my website (embed code), which actually retrieves the server response output into my site. I'm thinking of XMLHttprequest etc but I can't really get it to run.
Thanks
thanks to the latest addition to the Zotero web api (http://www.zotero.org/support/dev/server_api) we are now able to retrieve nice and formatted lists of references by calling the REST API including format=bib&content=bib.
But could someone please help me in creating some javascript to put on my website (embed code), which actually retrieves the server response output into my site. I'm thinking of XMLHttprequest etc but I can't really get it to run.
Thanks
This is an old discussion that has not been active in a long time. Instead of commenting here, you should start a new discussion. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
But you're going to run into cross-domain restrictions if you try to do this using XMLHttpRequest. The API request should be made server-side and cached. (This also prevents there from being an API request every single time someone visits your website.)