Hi,
Before I get down to the problem, I'd like to say that I've only got experience in turbo pascal from when I was in school, so I've been learning how to code according to what I have required in a web page via tutorials online. I'm actually a graphic designer/animator, so I'm using Dreamweaver CS3.
I've been working on a form in html. I've created a php captcha, which randomizes on refresh or by clicking a "refresh" button. When clicking the refresh button, the following Java Script is call:
<script language="JavaScript"><!--function flip() { if (document.images) document.images['captchacode'].src = 'form_captcha2.php';}//--></script>
Here's the code that calls the Java Script:
<a href><img src="Refresh.png" alt="" width="25" height="25" border="0" align="bottom" class="refresh" onclick="flip()"/></a></td>
It refreshes the captcha, but also seems to refresh the page and thus resets any form fields the user may have entered. I've tried other Java Scripts, which all refresh the captcha, but they all refresh the whole page.
It's not a big problem, but it can be irritating for the user, I figured. If anyone can offer me a reason and/or solution, it would be greatly appreciated.
Notice from galexcd: Any code must be within
or [html] tags