Jump to content

How to refresh <DIV> in HTML


Recommended Posts

Hello ,

 I have a problem , I want to wirte HTML code that only refreshes the <div> test , so just the code between de <div>...</div>

I was thinking to use some Javascript but I'm not sure this works in PHP , because my in HTML div there's PHP code.

My HTML code:


    <div id = "other div">
  	<div id="test">
     	<?php refresh this code ?>


Link to comment
Share on other sites

If you want to just refresh that specific div content without refreshing/reloading the whole page, you then need to look into AJAX which will use both, JavaScript to set a time to refresh the content by going to a php page and retrieving the content produced by that page to insert into that specific div.

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...