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
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.)