Very helpful! I've been looking for something like this. With a little a bit of modification on the example provided on
http://www.w3schools.com/js/js_examples.asp, I am able to refresh a div.
Thanks for the link!
Mossa
working code:
PHP Code:
<script type="text/javascript"> <!--using this code to refresh a div within page- add this button to the form <button type="button" onclick="refresh()">refresh</button>-->
function refresh()
{
document.getElementById("toggleText3").innerHTML="<iframe id=\"accounting\" frameborder=0 scrolling=no width=100% src=\"someplace.php\" height=\"300\" ></iframe>";
}
</script>
the iframe is within a <div>
so on:
PHP Code:
<button type="button" onclick="refresh()"></button>
the div is refreshed!