Avatar of Ivan Golubar
Ivan Golubar

asked on 

Refreshing just part of page

On change event of "select" element i want to use MainPage.php to reload an image.
I have next code, which is not  working;
js  code
function imageRefreshOnSelectChange(){        
$.ajax({
  type: 'POST',
  url:'/wp-content/themes/net/MainPage.php'
});
}

Open in new window

 

header.php
<body>
    <?php include_once("net/pageTop.php");?>
    <?php include_once("net/MainPage.php");?>
    <?php include_once("net/pageBottom.php");?>
</body>

Open in new window



MainPage.php
<?php
...............
............
 $users=..........;
?>
<div class="right" id="usersWindowID">
        <p><?php echo $users ?></p>              
    </div>

Open in new window



Is it possible to tell from the code i have provided what am i doing wrong?
JavaScriptPHP

Avatar of undefined
Last Comment
Julian Hansen

8/22/2022 - Mon