Hello,
To simplify my problem, let's say I have two text boxes given the id names 'email' and 'email_confirm.' I have a green check image and a red x image next to the 'email_confirm' text box. The images are in the same location and are both currently invisible. I want to make it so as I type in the text box 'email_confirm' it checks to see if it is the same value as the text box 'email' and either the green check or red x appear visible.
I first thought about doing this in javascript with the following code:
[CODE]
<script type="text/javascript">
if((document.getElementById('reg_email').value) == (document.getElementById('reg_email_confirm').value))
{
document.getElementById('check').style.visibility = 'visible';
}
else
{
document.getElementById('red_x').style.visibility = 'visible';
}
</script>
[CODE]
However, you have to refresh the page to get the image to appear. I want it to be dynamic and constantly change according to the current text box input. I feel like I can do this somehow with dhtml, or maybe I have to use an asp script? Either way, I don't really know where to go from here.



Reply With Quote

Bookmarks