wp_ajax function return the html page

My error was in my JS file.

I had to write wgs_ajax_object.ajax_url instead of wgs_ajax_object.ajaxurl