Jump to content


Photo

Php + Ajax, Pq Não Funciona


  • Faça o login para participar
1 reply to this topic

#1 cidadao

cidadao

    Normal

  • Usuários
  • 70 posts
  • Sexo:Não informado

Posted 10/10/2012, 09:56

Olá,

tenho essa function que chama um arquivo que faz a contagem de registro no mysql
mas não esta funcionando, o que esta errado?

<script>
function() {
    setInterval(function() {
        $.ajax({
            type: "GET",

            url: "temporeal.php?id=283"
            success: function(html) {
                 // html is a string of all output of the server script.
                $("#element").html(html);
           }

        });
    }, 5000);
});

function()
</script>

Grato,

Toninho

Edição feita por: cidadao, 10/10/2012, 09:57.


#2 shayllis

shayllis

    12 Horas

  • Usuários
  • 152 posts
  • Sexo:Masculino
  • Localidade:Barueri - SP
  • Interesses:PHP, MySQL, ASP.NET C# e VB, DreamWeaver, VisualStudio, JavaScript

Posted 22/10/2012, 14:51

Bom pelo que pude ver o problema está na declaração e chamada da função.... tenta algo do tipo


function funcao(){
.........
}
$(document).ready(function(){
funcao();

})




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq