Using JavaScript to refresh and reload an iframe on main page
by kalai[ Edit ] 2010-02-01 12:24:33
<iframe name="security-code" id="security-code" src="/gen-captcha-image.php"></iframe>
refreshCaptcha() looks like this:
<script type="text/javascript">
function refreshCaptcha () {
var code = document.getElementById('security-code');
code.src = code.src; // that is the essence here
}
</script>