Jarle Posted February 28, 2018 Share Posted February 28, 2018 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: <HTML> <HEAD> </HEAD> <BODY> <div id = "other div"> </div> <div id="test"> <?php refresh this code ?> </div> </BODY> </HTML> Link to comment Share on other sites More sharing options...
dsonesuk Posted February 28, 2018 Share Posted February 28, 2018 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. 1 Link to comment Share on other sites More sharing options...
Jarle Posted February 28, 2018 Author Share Posted February 28, 2018 Thanks but I'm a newbie to AJAX Link to comment Share on other sites More sharing options...
dsonesuk Posted February 28, 2018 Share Posted February 28, 2018 No problem, there is a tutorial at w3schools.com on learning AJAX, isn't the internet amazing! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now