fix delete ajax method and javascript