i need to validate my text box when i move from one text box to another...
Can anyone help me.....
I need like this....i need to change border color also....can anyone help me please?
E-Commerce steps UI.jpg
i need to validate my text box when i move from one text box to another...
Can anyone help me.....
I need like this....i need to change border color also....can anyone help me please?
E-Commerce steps UI.jpg
The border colors can be done using CSS classes.
input.failed {border: 1px solid red;}
input.successful {border: 1px solid green;}
The validation would be Javascript, but you're not going to find an answer to this since the validation steps will depend on the input you're trying to validate.
If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.
If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.
My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)
You would want to do something like this: (This uses jQuery)
<script type="text/javascript">
$('.number_validate').blur(function(){
if($(this).val() > 0){
$(this).css('border','1px solid #00ff00');
}
else
{
$(this).css('border','1px solid #ff0000');
}
});
</script>
<input type="text" class="number_validate" name="textbox" onblur="validate()" />