0

I have a jQuery Ajax call that calls a php script. This call works if the file is in the root of the site but does not work if this php script is in the theme folder . Additionally, I have a 500 error (Internal Server Error) or 404 (Page Not Found).

My Ajax Call:

        $(".buscando").on('click', function( eve ){

            eve.preventDefault();
            var buscando = $('.buscando').val();

            $.ajax({
                url: "<?php bloginfo('template_url'); ?>/inc/retorno.php",  <--- this not work
                url: "<?php bloginfo('url'); ?>/retorno.php",               <--- this work
                data: { buscando: buscando },
                type: "POST",
                dataType: "html",
                success: function(data){

                    $("#resultado_pesquisa").html(data);
                    $("#resultado_pesquisa").removeClass("esconder");

                }

            });  

        });

http://pastebin.com/zUfQ70DK <<<< This is PHP Script

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.