File opening via Load jquery method

Asked

Viewed 324 times

0

I don’t even know where to start! I’m trying to create an administration page, where the data has to be sent via $.post and receive via $.get, but when I try to read the php file where the script for reading the data, by load method it n opens!!

Jquery code

    $(document).ready(function(){
        alerta();
        Ler();
    });

    function Ler(){
setTimeout("$('#pagina').load('http://www.teste.dev/views/categoria/mostrar.php', function(){ $('#loaderImage').hide(); });", 1000);
    }
  • Have you analyzed the error that gives? Try viewing your browser’s debuger to see where you’re getting lost, maybe it’s a relative path problem.

  • As well "the data has to be sent via $.post and method and receive via $.get"??

  • Hi, @Sam, I went to see your edition because I was giving problem in a plugin my site, the <pre> which you have placed makes Syntax Highlight not work. . . . . You only need to use HTML here in special cases sup,sub,kbd, the rest is better in pure Markdown. Two enter make a paragraph <p>, two blank spaces force the <br>, code is only apply 4 spaces to make the <pre>. Vide How we should format questions and answers?

1 answer

1


Which error is returned?

Your absolute path is right?

The "alert()" function exists in your script?

Try changing your code:

function Ler(){
    setTimeout(function(){
        $('#pagina').load('http://www.teste.dev/views/categoria/mostrar.php',function(){ 
            $('#loaderImage').hide(); 
        });
    }), 1000);
}
  • Really the problem was in the absolute path, after checking the browser log, I noticed that it did not find the specified file..

Browser other questions tagged

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