troubleshooting Question

Simple jQuery help please...???

Avatar of Andrew Angell
Andrew AngellFlag for United States of America asked on
JavaScript
5 Comments1 Solution231 ViewsLast Modified:
I'm working on a client's project and unfortunately, I'm really stupid when it comes to jQuery.

There's a basic credit card form that I'm processing with PayPal.  I've got all that ready to go, but my problem is this form has validation on it using jQuery, but it seems that it's not actually submitting when the validation passes.  

If something is invalid it highlights it and gives you a notice accordingly.  If everything passes, though, it just doesn't go anywhere or do anything.

I've attached the jQuery code that I see at the top of the page I'm working on.  I just need it to actually POST the form data to my processing script when it validates successfully.

Please advise.  Thanks!!
<script type="text/javascript">
$(document).ready(function() {
	$("#signupform").validate({
		debug: true,
		focusInvalid: false,
		errorElement: "div",
		errorPlacement: function(error, element) {
			error.appendTo( element.parent("div.wrap") );
		},
		
		highlight: function(element, errorClass, validClass) {
			$(element).parent().addClass('error-row');
		},
		unhighlight: function(element, errorClass, validClass) {
			$(element).parent().removeClass('error-row');
		}
	});	
});
$(document).ready(function(){
	var amount = $('.plans input:checked').val();
	$('#signupform #amount').attr('value',amount);
	$('.plans input').click(function(){
		amount = $('.plans').find(":checked").val();
		$('#signupform #amount').attr('value',amount);
	});
});
$(document).ready(function(){
	var amount = $('.plans input:checked').val();
	$('#signupform #amount').attr('value',amount);
	$('.plans input').click(function(){
		amount = $('.plans').find(":checked").val();
		$('#signupform #amount').attr('value',amount);
	});
});
</script>
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros