I have a div that displays text from a php session:
<div id="sessioncontent">
<?php if (isset( $_SESSION['returntext'])){ echo $_SESSION['returntext'];} ?>
</div>
I have a javascript method that calls another php script which changes the text within that session variable. At the end of the method, I want the div to refresh so that the new text within the session is echoed. I have tried the following line but it doesnt work:
document.getElementById("sessioncontent").innerHTML = document.getElementById("sessioncontent").innerHTML;