PDA

View Full Version : Check box and Radio Dial form validation



johnwboyd
03-29-2009, 07:30 PM
This is very frustrating the lack of helpful resources on this topic. I hope someone here can help. Please put the solution within the code context and don't just throw code and jargons or it'll likely just confuse and frustrate myself and other rookies.

I want to get the same validation effect as the fields on this page but for the radio dials and check box(s):

The js:
http://johnwboyd.net/templates08/car-loan1/2/form.js

The HTML:
http://johnwboyd.net/templates08/car-loan1/2

I'd also like to implement character, email, etc. validation into this such as
at w3schools (NO alert though...just the field text color change only):
function validate_email(field,alerttxt)
{
with (field)
{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
if (apos<1||dotpos-apos<2)
{alert(alerttxt);return false;}
else {return true;}


When I try to integrate 2 scripts thing seem to go haywire. Sure wish javascript could be more integration friendly for non tech wizards...

Thanks!