Page 1 of 1

Re: Silent deletes and moves of posts

Posted: May 4th, 2011, 9:46 am
by iDVB
pair of dimes wrote: however, for the response it would be nice if it could generate an xml
response also.
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.
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"
	});
});
See here:
http://screencast.com/t/oZJ2raff2z