i want to refresh multiple div value without refreshing the whole page using one function.

<div class="live_update" id="a">33</div > <div class="live_update" id="b">34</div > <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> <script>
    function autoRefresh_div()
    {
        $('.live_update').load('Dashboard.php' +  ' .live_update');
    }
    setInterval('autoRefresh_div()', 1000); 
</script>

Hello there and welcome to DaniWeb!

So let's see ... You have two div.live_update divs, each with a different id. And now, every second, you want to call the autoRefresh_div() function. As far as I'm aware (at least this is the way I do it), I don't put the parentheses in the setInterval function. So in other words I believe it should be setInterval('autoRefresh_div', 1000). That's the first thing I see.

So now the second thing is inside the function, I'm not quite sure what you're trying to do. You want to load the contents of the webpage 'Dashboard.php.live_update' and tstick those results into both divs? I'm confused what you're trying to do there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.