Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function doAjaxRequest(){
- // here is where the request will happen
- console.log("Started");
- jQuery.ajax({
- type: 'GET',
- url: 'http://nextweb.uc.tdcdev.com/wp-admin/admin-ajax.php',
- data:{
- 'action':'do_ajax',
- 'fn':'adviser_search',
- 'query': 'Valerie'
- },
- dataType: 'JSON',
- success:function(data){
- if(data.success) {
- console.log(data);
- alert("It works");
- }
- },
- error: function(errorThrown){
- console.log(errorThrown);
- alert('error');
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement