Maybe I'm not doing something right, but it seems to me that adding a post does not return JSON or XML or even well formed HTML.pair of dimes wrote: however, for the response it would be nice if it could generate an xml
response also.
It seems to generate an error when using JQuery.ajax()
Code: Select all
var anchor = $(this);
var location = anchor.attr("href");
var path_to_server = [MY DOMAIN];
var api_key = [MY API KEY];
var url = path_to_server + "/api?mode=addurl&name=" + escape(location) + "&apikey=" + api_key;
anchor.click(function(e) {
e.preventDefault();
$.ajax({
url: url,
dataType: "html"
});
});
http://screencast.com/t/oZJ2raff2z