views:

72

answers:

2

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!

A: 

Can you post some HTML and javascript? Does IE6 behave the same way with javascript turned off? Are you validating on the server side too? Have you setup Fiddler to see what's being sent across?

Andy Gaskell
+1  A: 

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?

James Wiseman
1. The button is disabled from the start2. Yes3. It could be the case4. No, not been able to replicate the error at all.5. All fields are validated during completion and on submission. I have various routines in place to protect against SQL injection.
Choog