Field Validation Will Not Work
I'm new to jquery mobile. My form works but none of the fields need to be filled in even though I have javascript validation. Here is the javascript part. I have it in my header. I believe I'm using jquery 1.3 I tried upgrading to the latest version and it really jacked up everything. I'm too far along to switch now.
- <script>
- $(document).on( "pageinit", function() {
- $('#checkpay checkform').validate({
- rules: {
- dcs1: {
- required: true
- },
- dcs2: {
- required: true
- },
- ckresp: {
- required: true
- },
- ckphone: {
- required: false
- },
- ckemail: {
- required: true
- },
- ckname: {
- required: true
- },
- addr1: {
- required: true
- },
- addr2: {
- required: false
- },
-
- ckcity: {
- required: true
- },
- state: {
- required: false
- },
- ckzip: {
- required: true
- },
- routing: {
- required: true
- },
- account1: {
- required: true
- },
- account2: {
- required: true
- },
- pmtamount: {
- required: true
- },
- comment: {
- required: false
- }
- },
- messages: {
- dcs1: {
- required: "Please enter DCS#."
- },
- dcs2: {
- required: "Please enter DCS#."
- },
- ckresp: {
- required: "Please enter Responsible Party."
- },
- ckemail: {
- required: "Please enter your email."
- },
- ckname: {
- required: "Please enter name on check."
- },
- addr1: {
- required: "Please enter address."
- },
- ckcity: {
- required: "Please enter city."
- },
- state: {
- required: "Please enter state."
- },
- ckzip: {
- required: "Please enter zip code."
- },
- routing: {
- required: "Please enter your routing #."
- },
- account1: {
- required: "Please enter your account #."
- },
- account2: {
- required: "Please enter account # again."
- },
- pmtamount: {
- required: "Please enter payment amount."
- }
-
- },
- errorPlacement: function (error, element) {
- error.insertAfter(element.parent());
- }
- });
- });
-
- </script>
After I upload the page and check it with my phone, the page just times out and never loads.
Here is my form code.
It does the same with both GET and POST
If I don't use the javascript the form works fine and I receive the information via email from my php page.
Any help is appreciated.