Skip to main content

Bug Tracker

Side navigation

Ticket #5786: index.html


File index.html, 0.6 KB (added by rschouten, January 12, 2010 08:57AM UTC)

HTML with ajax to perform an HTTP DELETE

<!DOCTYPE html>

<html>
	<head>
		<title>Test DELETE</title>
		<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script>
		<script>
			$(document).ready(function () {
				$("button").click(function (ev) {
					$.ajax({
						type: "DELETE",
						url: "response.html",
						dataType: "text",
						success: function (data, textStatus) {
							console.log(data);
						},
						error: function (XMLHttpRequest, textStatus, errorThrown) {
							console.error(XMLHttpRequest);
						}
					});
				});
			});
		</script>
	</head>
	
	<body>
		<h1>Test AJAX DELETE</h1>
		<button>DELETE</button>
	</body>
</html>

Download in other formats:

Original Format