22
votes
Updating dimensions when focus is lost from any of 9 columns
I don't do C# so pardon the syntax, but you should be able to reduce the amount of code by using a for loop over a string array with your column names.
Again I don't do C# but in Java you could do ...
17
votes
Login Form in HTML
This is one of those places where if you ask 10 developers the same question, you will get at least 15 answers, and they are all valid.
My 2 cents:
It's 2014. Use HTML5.
Discover jsfiddle.net for ...
17
votes
Accepted
Is this form submission validator professional?
A few things:
Variables in JavaScript should be camelCased. PascalCase is traditionally left for types.
CSS classes are ...
15
votes
Can people understand my form validation code?
Can people understand my code?
Its certainly not bad code - but I believe there are some things you can do which will improve the speed with which people like me can grasp what it is doing (and why).
...
15
votes
Accepted
Updating dimensions when focus is lost from any of 9 columns
A shorter version would be to create an anonymous array in the if statement combined with a collection initializer where you will add all of the column names and ...
14
votes
Is this form submission validator professional?
Code should read like poetry
People who don't know that jQuery(function); is the same as jQuery(document).ready(function); will ...
13
votes
Login Form in HTML
Security-wise, you need to make sure you a) never trust the user and b) never trust the user.
You should realise that anyone has access to the GET parameters, ...
13
votes
Accepted
PHP Form Builder Class
Right, a short and simple answer to each of your questions, for now. I'll be expanding on each of the issues through updates:
Is it efficient
Define efficient. If by that, you mean: is it fast, then ...
13
votes
jQuery AJAX form using bad practice
In a sense, your code has already been reviewed, though I disagree with the excessively negative assessment. It is far from being awful and some of the worst JavaScript code ever.
you manually ...
10
votes
Checking login from associative array vulnerabilities
In this response, I assume that you are making a little script for yourself and some friends, i.e. not a large or critical system (e.g. that could delete other files). So you want some security, but ...
10
votes
Can people understand my form validation code?
Take care that I can read JavaScript but it was a whole time ago that I effectively wrote in that.
I see you've created your own isNumeric function.
Maybe you can ...
10
votes
Accepted
How much is 2 + 2?
Naming
The naming of the arrays related to the operators is not so great:
In $operatorsLetter you have the names of functions that do some operation. ...
10
votes
How much is 2 + 2?
I would:
improve (avoid) the PHP & HTML mixing.
use one associative array instead of two array in order to define the operators
avoid a while. If the problem ...
10
votes
Selecting checkboxes based on URL parameters
Extract the chk parameter value from location.search and use a "lookup table" object:
...
9
votes
Accepted
Submit an array as an HTML form value using JavaScript
First of all, I'd make sure that supporting IE7 is actually required. It's a really old browser by now, and there are a lot of things that are much more difficult to do.
Anyway, as for sending ...
7
votes
CheckChanged event readability
Before thinking I didn't read well, I didn't want to rewrite everything: the final edit is at the bottom of the answer, but please read everything to understand it all. :)
If the code inside the <...
7
votes
Checking all checkboxes
You can streamline the code by caching the selectors; this will improve performance as well. Next, you should use prop instead of ...
7
votes
Accepted
Prorated Refund Calculator (v2)
Your code is really clean, but it could be improved in places:
You could consider placeholder attributes in the input fields on your HTML to display the format of ...
7
votes
Accepted
Populating many fields in a form using jQuery/AJAX
For starters, you can make compound selectors so this:
...
7
votes
HTML 5 form validation and form handling
Validating HTML5 Code
It seems that you are new to HTML5, so it's a good idea to validate your code. You have 14 errors and 5 warnings in your code:
autofocus="on"...
7
votes
Selecting checkboxes based on URL parameters
First of all, it would help tremendously if you named the URL parameter values and the form element IDs consistently. Why do you have chk=webdes-check ...
7
votes
Simple checkboxes with React
I think everything Sam Onela said is great. I'm gonna add a few more things.
Don't modify your state directly
In general, it's considered bad practice to directly modify your state object. According ...
6
votes
Client-side validator for contact information form (name, phone, e-mail)
Validation problems
Beware of overzealous validation. It's easy to create bugs by rejecting valid input. For example:
Some people have only one name, so the one of the name fields must be allowed to ...
6
votes
Can people understand my form validation code?
In my eyes, any function called myFunction is not a good function.
This applies to foo() and ...
6
votes
Login Form in HTML
I'm not an expert on HTML, but I am quite decent in using it and can give you the following pieces of advice:
Seperate the CSS from your HTML page, it is already good that you have seperated (most) ...
6
votes
Accepted
Form Validation Evaluation
I was wondering if this is good
Well, are you just looking to prevent the normal user from messing up during registration? I think it would be fine for that.
I'll see if I can point out flaws in ...
6
votes
Triggering editing mode for a form
A small note on naming:
Being new to your code base, I have no idea what MIF represents and worse, IF looks a lot like ...
6
votes
Accepted
Changing element visibility based on multiple checkbox states
First iteration
You neglected to localize i.
I'd like to rewrite the statements to make it more obvious that the visible flag ...
6
votes
Upload an image to a folder through a form
You should invert the order of your PHP processing and your HTML output. When working in PHP, always strive to adhere to this approach, as it will help you as you start working on more complex logic. ...
6
votes
Accepted
HTML form using <table> or <div>
Specification
In the HTML specifications you can find the following:
The HTML table model allows authors to arrange data -- text, preformatted text, images, links, forms, form fields, other tables,...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
form × 390javascript × 188
php × 109
jquery × 109
html × 78
validation × 73
beginner × 42
dom × 22
react.js × 21
event-handling × 20
python × 19
object-oriented × 19
jsx × 19
security × 17
html5 × 17
c# × 15
ajax × 15
performance × 12
datetime × 12
ruby-on-rails × 12
email × 12
ruby × 10
comparative-review × 10
mysql × 9
css × 9