Choog
Choog

Reputation: 89

JQuery + form fields not inserting to database 100% correctly

I have a complex form which uses blur events to trigger updating to mysql. There is validation which disables the submit button until all required fields are completed. The problem is, users are managing to submit the form even though they haven't completed all the fields.

My theory is, for some reason the database is ignoring some of the values that are being sent from the form, but the validation is still recognising that all fields have been completed.

As far as I can tell, Internet Explorer 6 is the culprit. It works fine with any modern browser (Firefox, Chrome, Safari, IE7 + 8) but is falling over on 6.

What would be the possible cause for the values not getting sent to the database, even though the user is getting a 'check' mark appearing next to the field as if there has been a successful update.

Should the database update be delayed in some way? Is there a flaw in IE6 which is causing this?

Any suggestions would be much appreciated!

Upvotes: 0

Views: 152

Answers (1)

Mutation Person
Mutation Person

Reputation: 30520

Server-sde validation is definately the way to go here. It should be the first thing you write before "enhancing" the user experience by adding client side code.

Its difficult to tell what the problem might be without any sample code, but I have a few questions:

Does your button start off disabled, i.e. is the attribute disabled="disabled" embedded in your HTML?

When the user fills out all the fields, the button will be enabled. Is it the disabled again if they clear one of the fields?

Is it possible you are using some JavaScript (or even CSS) that is recognised by your "Modern" browsers but not IE6?

Have you been able to replicate it specifically yourself?

Do you validate your form fields upon submission? Is it possible your fields are vulnerable to SQL injection?

Upvotes: 1

Related Questions