Archive for jQuery
SCRIPT438: Object doesn’t support property or method ‘getElementsByTagName’
It was recently brought to my attention that one of my websites was not functioning correctly in Internet Explorer 9. Parts of the page and javascript would load, however the AJAX portions of the site failed to load. Using the F12 Developer tools package with IE9 I was able to find the error: The solution [...]
jQuery Validation Word Count Custom Method
The jQuery Validation plugin is one of the best ways to validate your forms client side. It has built in functions to check the maximum amount of characters allowed in each form field, which works great in many situations. However for a project I am currently working on the client requires text areas to have [...]
jQuery UI Autocomplete: One Field Searching for First and Last Names
In the application I’m working on, jQuery UI Autocomplete is used to search for people using their first and last names. The MySQL statement for retrieving names based on an input value was as follows: This worked fine until I did some usability testing. I found that a lot of users typed in the first AND last [...]
Increasing Password Security: Hash with sha256 Client-Side
An important part of user registration and authentication is the security of their password. A password stored in plain-text, or transfered over the internet in plain-text without the use of a SSL certificate can lead to the theft of the password, posing a security risk to not only the user but to your site as [...]
jQuery Performance and Coding Tips
This is a great article that showcases 50 jQuery Snippets to help you program scripts for your website. It covers basic jQuery functionality and methods, all the way to how to fine-tune your code for increasing website performance. 50 jQuery Snippets That Will Help You Become A Better JavaScript Developer
jQuery Validation submitHandler fails silently in Chrome
There is an odd issue with the jQuery Validation plugin’s submitHandler callback with Chrome. To validate the form I had my function setup as follows: The alert box and form submitted correctly in Firefox. However in Chrome, the alert box worked, but after that the form refused to submit. I narrowed down the issue to [...]
The Easiest Way to Select All Checkboxes with jQuery
After looking at many code samples online that were unnecessarily complex I’ve come up with my own simple method of selecting all checkboxes on a page: You can change the selector to target certain groups of checkboxes. To deselect all checkboxes, simply change the “true” to “false”:
jQuery UI Datepicker Inline Select
It is well documented on the jQuery UI site on how to take a value from Datepicker when calling it from an input field. However when embedding Datepicker on a page (associating it with a div instead of an input field), you have to add a small amount of code to easily capture values from [...]
WordPress & jQuery: “$ is not a function”
If you are trying to add your own jQuery code to WordPress, and have had the error “$ is not a function” show up on Firebug, here is the fix: Convert all dollar signs ($) to ‘jQuery’ The dollar sign is reserved in WordPress for the Prototype library, which is why it errors out. For [...]
Jcrop Large Image Previews
Jcrop is an excellent jQuery plugin developed by Deep Liquid. It is used to easily crop images on websites without having to use any photo editing software. There is documentation on their website on how to use boxWidth and boxHeight to deal with large resolution pictures, however it does not tie together those methods with [...]



