Calling Ajax In WordPress

Here is the code for calling ajax functions in WordPress. //javascript function function test() { var sitename = “http://localhost/test/”; //getdynamic var ajax_path = “/wp-admin/admin-ajax.php”; var name=$(‘#name’).val(); var cell=’9999999999′; $.ajax({ type : “POST”, async : false, url : sitename + ajax_path,…