I wrote this script for my validation page.I used javascript and jquery mixed it all up. For some reason when I submit the gender validation doesnt work right, it keeps asking to validate but every other condition works. What I've pasted below is just the gender condition and the "if everything goes right to submit the page" condition, this is all included in a function ( function validate ) if($('.sex').not(':checked')) //check if gender is checked**************************************************************** { $('.gender_txt').css("background-color","yellow") $("#gender_error").html("Please select your gender").css("background-color","red").css( "text-align","center").fadeIn("slow"); $("#error_notice").html("Please fill in the red fields you missed above ").css("background-color","red").css( "text-align","center" ) .fadeIn("slow"); $('.sex').click(function() { $('.gender_txt').css("background-color","#B9BFAB"); }); } …

Member Avatar
Member Avatar
+0 forum 11

The End.