6 articles Javascript

Javascript: A simple way when validating forms to ensure at least one checkbox is checked

Check so at least one checkbox on your form is checked before it's allowed to submit:  

Get the image width and height of an image file at a remote URL in Javascript

Here's how you can get the image width and height of an image file at a remote URL. This will return an a multi-element associative array containing values under "width" and "height" as its keys.

Get date of last day of current month for special processing like for credit card expiration dates

In case you ever need to manually validate those pesky multi-field credit card date fields, you know "Month" and "Year" and you want to make sure the expiration is never set prior to the current month for obvious reasons like the credit card would get declined, you need to have the browser client side figure…

Javascript: Basic Date Object for Quick Reference

Here's an exercise to create a new date object and convert today's parts into the more human-readable month/day/year format. It's not built into the Javascript language, what can you do?! Here's a breakdown of some of the main methods built into the Date class, just the main ones

Disable/Remove ShareThis appended hashtag from site URLs

ShareThis is a useful tool to encourage sharing of your website's pages and content with others in social media. It has other uses as well since it can link users to account they're already logged into making it easier to re-tweet or post your page on Facebook. However, at the top of the URL the…