Using JavaScript to refresh and reload an iframe on main page

by kalai 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>

1187
like
0
dislike
0
mail
flag

You must LOGIN to add comments