modified ajax delete so that it works even if javascript is disabled