Request ajax with Wordpress

Asked

Viewed 20 times

0

I am working on a custom Wordpress page.
I am making a request via ajax on this custom page, which is theme directory:
wp-content/themes/my-theme/my-page-custom.php
The page that will process is also in the same directory, but does not work the ajax request, bringing back an error 404.
I believe I should do some procedure before I point out the right way, maybe...
Follows my code:

$(btMes).click(function(){
      // REQUISIÇÃO --- V I A --- A J A X
      var radioIn = $("input[name='radioVlrM']:checked").val();
      var dtIC = $("input[name='singleMonth']").val();        
        $.ajax({
            type:'GET',
            url: 'processa.php',
            data: { 
                'radioC': radioIn,
                'dtiC': dtIC           
            },
            success: function(result){                
                var view = $('#result_media').html(result);
                $(table).show('slow');
            } // End of success function of ajax form
        }); // End of ajax call
        return false;
    });
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.