javascript - Can't refresh one specific div after ajax load (MVC system) -


i checked others answers questions, no 1 seems work.

he's problem, try reload div got php variable. got mvc system, can't call other files when want. controller doesn't receive arguments ajax call ($_post , $_files not isset). when try other stuff after ajax call, works (example: unlink file)

<?php      $test = 'lksd';       ...     if( conditions )       {          $test= 'piof';          unlink(../images/myimage.jpg);       }    ?>     ... <div id="test">    <?php      echo $test;    ?>  </div> 

and ajax call in jquery plugin (http://www.dropzonejs.com/)

i found can stuff, , call function:

$('#test').load(window.location + "#test"); 

my div doesn't refresh file deleted, if have idea of can solve problem...

thanks in advance

create php detail want stand alone. call getdetail.php:

<?php     $test = 'lksd';    ...    if( conditions ) {        $test= 'piof';    }    echo $test; ?> 

in page, can load content @ time:

<html> <body> <div id="test"> </div> <a href="#" id="reloaddetail">reload</a> <script> $(document).ready(function(){     $("#test").load("getdetal.php");     $("#reloaddetail").click(function(){         $("#test").load("getdetail.php");     }); }); </script> </body> </html> 

Comments