am i correct in doing this?

Answer this question

  • am i correct in doing this?


Answer #1 | 22/12 2013 21:59
Doing form validation with JavaScript doesn't eliminate the need to do form validation on the server side. All it does is allow you to provide feedback to the user quicker, because you don't have to go back to the server to validate when JavaScript is enabled. A malicious user can easily disable tests in your form validation JavaScript code, and submit whatever invalid data they want to submit. They don't even have to look at the JavaScript. They can use a program like Tamper Data (Firefox plugin) to modify the submit data after you validate it, but before it is sent to the server. There is no way you can know that that is happening. If you only need JavaScript for validation, not for other features of your site, then don't require it. Just do the server side validation and report the error if the data is invalid. Then your page works with our without JS, it just works better with it.
Positive: 62 %
Answer #2 | 22/12 2013 22:01
You could add a function that handles errors, if javascript was turned off you could divert to your errorHandler on some page error and check to see if javascript was on or off then act appropriately. Generally though, If someone turns javascript off in the middle of your page flow, then well they should expect odd results. I think checking on page load is fine enough.
Positive: 56 %
Answer #3 | 22/12 2013 23:58
Positive: 36 %

Possible answer

I opted for commerce. Am I correct in doing this? Frequently asked in. Update Cancel. No Answers Yet. Related Questions. Commerce: Why do we sign receipts?
Read more
Positive: 62 %
Terry. Well depends on exactly what you are doing I guess. But if you are getting user input this is an easy way. Using CSNG() etc. will cause ...
Read more
Positive: 57 %
Thin Client and Virtual Machines Thread, VeeamZip - Am I doing this correct? in Technical; We are a Primary School, and have been using Veeamzip to backup ...
Read more
Positive: 43 %
Yes....I did a search and found lots of stuff on this but still would like to know that I absorbed all the information correctly. Okay, I got the rest
Read more
Positive: 20 %

Show more results