Search Qodo.co.uk

Archive for the ‘JavaScript’ Category

Javascript: Check/uncheck all options for checkboxes

Javascript: Here’s another really simple bit of JavaScript functionality that has a real benefit to your visitors – allowing them to check or uncheck all options in a form. This is similar to the type of functionality you’ll see in GoogleMail and Hotmail and it’s popular as it means your visitors don’t have to select each option one at a time!

Read more »

Post to Twitter


JavaScript: Restrict keyboard character input

Javascript: If you want to improve your form inputs by restricting the characters the user enters, this function might come in handy. It restricts the keyboard input for a text field so that they can only enter the characters you want. Read more »

Post to Twitter


Javascript: Swapping select box options

Javascript: Here’s a JavaScript function that let’s you swap options from one select box to another to allow users to choose the options they want. Be careful when using this type of functionalist as it could be inaccessible to some users and can cause problems when submitting your forms. Read more »

Post to Twitter


Javascript: enabling and disabling form field elements

Here’s another useful function for enabling and disabling your form elements using javascript. This function can be used to disable form elements when a user has submitted a form to stop them submitting it again. Read more »

Post to Twitter


Javascript: check if a UK postcode is valid

Here’s two useful postcode functions; one that will help for checking if a string is in the valid format for a UK postcode; and another that formats a string into a nice postcode format. They both use regular expressions to make them fast! You could use them for client-side form validation. Read more »

Post to Twitter


Javascript: Pop up DHTML calendar using CSS

If you are looking for a simple JavaScript calendar that uses CSS and is easy to customise, then take a look at my calendar. I have created a basic javascript calendar that can be tweaked to suit your needs that makes it easy for your users to pick a date. Read more »

Post to Twitter


Javascript: trim leading and trailing spaces

Here’s a quick function to remove leading, trailing and multiple spaces from a string using regular expression which is much faster that using loops! Read more »

Post to Twitter


Careful use of accessible JavaScript

JavaScript can really pose some difficult accessibility issues for users when not used correctly and with consideration. But there are some steps you can follow in your designs to make sure your site accessible to a larger audience. By designing with these steps in mind means you will not be ignoring the 3-6% of users* who cannot, or will not use JavaScript. Read more »

Post to Twitter


Javascript: Checking if a date is valid

Sometimes when creating a web application you need to check that a date entered by the user is actually valid! Here is a quick and easy way of checking the validity of a string to ensure that it’s in the correct format (DD/MM/YYYY) and is a real date by returning true or false. Read more »

Post to Twitter


Javascript: Select all options for a select box

Here’s a javascript function that will allow the user to select all or none of the options in a multiple select box. It is quite simple to use, first either provide the id of the select box or the actual select box object and it will do the rest. Read more »

Post to Twitter


You are currently browsing the archives for the JavaScript category.

Blog Archives

Blog Categories