Blog posts tagged 'javascript' | Blog archive
I'm hardly a big writer but every now and then I work on something that I think might be useful to share. So here it is – my web blog thingie-ma-bob.
Showing 1 - 10 of 10 blog entries. < Previous 1 Next >
Javascript: Check/uncheck all options for checkboxes
Posted by Stewart on 25 November, 2009. Comments (0)
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!
JavaScript: Restrict keyboard character input
Posted by Stewart on 27 May, 2008. Comments (17)
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.
Javascript: Swapping select box options
Posted by Stewart on 3 December, 2007. Comments (1)
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.
Javascript: enabling and disabling form field elements
Posted by Stewart on 17 August, 2007. Comments (9)
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.
Javascript: check if a UK postcode is valid
Posted by Stewart on 12 May, 2007. Comments (6)
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.
Javascript: Pop up DHTML calendar using CSS
Posted by Stewart on 30 March, 2007. Comments (15)
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.
Javascript: trim leading and trailing spaces
Posted by Stewart on 29 March, 2007. Comments (8)
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!
Careful use of accessible JavaScript
Posted by Stewart on 7 March, 2007. Comments (0)
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.
Javascript: Checking if a date is valid
Posted by Stewart on 20 February, 2007. Comments (2)
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.
Javascript: Select all options for a select box
Posted by Stewart on 16 February, 2007. Comments (9)
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.Showing 1 - 10 of 10 blog entries. < Previous 1 Next >

