• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

How do I refresh a DIV content?

javascriptphpjqueryhtml


PHP Snippet 1:

function updateDiv()
{ 
    $( "#here" ).load(window.location.href + " #here" );
}

PHP Snippet 2:

$("#yourDiv").load(" #yourDiv > *");

PHP Snippet 3:

<script> 
$(document).ready(function(){
setInterval(function(){
      $("#here").load(window.location.href + " #here" );
}, 3000);
});
</script>

<div id="here">dynamic content ?</div>

PHP Snippet 4:

$('#yourDiv').load('#yourDiv > *')

PHP Snippet 5:

$.get("/YourUrl", {},
      function (returnedHtml) {
      $("#here").html(returnedHtml);
});

Related Snippets

Cannot retrieve error message using Symfony HttpClient if the response is not "ok"

Currently Using CodeIgniter Framework i have an Error

Display Brand Name Above Product Title in Woocommerce Cart, Checkout Page, Orders and Email Notification

how to loop through json response data using ajax jquery?

Where do I need to place a hook for phpunit?

Set quantity minimum, maximum and step at product level in Woocommerce

Clients authentication and user authentication with laravel

How do I enable error reporting in Laravel?

how to get value from array in laravel

Adding multiple items to WooCommerce cart at once

How to test a php login connected to a mysql db through xampp?

How can I remove the "Advanced" panel of all blocks in WordPress block editor?

MySQL default time format UTC or GMT?

Open a popup box after receiving result from ajax

java URL working on browser but not in client program

About Contact Privacy policy Terms and conditions