published by d.cochran on Thu, 03/05/2015 - 08:38
A problem I run into all the time is how to use the equivalent of PHP's "continue" function with jQuery's "each" function. So I guess it is time to document it.
We can break jQuery's $.each() loop at a particular iteration by making the callback function return "false". If we return "true", it is the same as a continue statement in a for loop; it will skip immediately to the next iteration.
For example:
published by d.cochran on Fri, 01/17/2014 - 09:57
There are many different ways to get the values of checkboxes using javascript or jQuery. I have assembled a list of some of the most popular methods.
Getting Radio Value using Name Attribute and jQuery
This method uses jQuery to select the DOM object via the name and property selector.
published by d.cochran on Wed, 08/14/2013 - 08:04
It is possible to submit files using "multipart/form-data" and ajax. There are many sites out there that show complicated ways of doing this when it is really easy. It simply requires a little configuration of the jquery ajax process and grabbing your form data using the FormData() function.
Using the following method, you can submit multiple files and are not just limited to one.
Lets take a look at our form.
published by d.cochran on Thu, 09/20/2012 - 07:43
published by d.cochran on Thu, 08/30/2012 - 07:49
published by d.cochran on Fri, 08/24/2012 - 17:32