values not updated after an ajax response

前端 未结 2 1760
遥遥无期
遥遥无期 2020-11-28 00:15

I am sending some form data via ajax to a php script in the same page. PHP must process the data and show results in the same page.

I am using this syntax for ajax:<

2条回答
  •  一个人的身影
    2020-11-28 00:36

    That is expected behavior. Move your PHP processing to a different page.

    $.ajax
    ({
        type: "POST",
        url: "anotherphppage.php",
        data: $("form").serialize(),
        success: function(result)
        {
            updatechart(result);      
        }
    }); 
    

    Try this and you'll see what I mean:

    
        
            
    
            
        
    
    
        Try this:

提交回复
热议问题