- 10 Things To Do When Launching A Site
- Using PHP to connect to SFTP
- Asynchronous Virtual Pageviews with Google Analytics
- 5 Advanced Text Editing Keyboard Shortcuts
- Get the headers of a HTTP request with PHP
- How-to: Create PDF preview images in PHP – Part 2
- How-to: Create PDF preview images in PHP
- Quick Code: Get the domain name in JS
- Things to think about when designing a logo
ImageXY - Mac OS X Batch Photo Resizer
Quickly and painlessly bulk resize images, change image formats and create web-friendly photos for your website.
Available on the Mac App Store!
In many cases a JS function will be attached to the submit method of a form and then a series of checks is performed on the data before allowing the form to be submitted. Sometimes JS is used to disable a forms submit button until certain checkboxes or fields are completed, other times JS will remove the action of the form (making the form un-sendable) until data is validated and the form is submitted by a JS action.
In all of these cases you usually end up with a form that is un-usuable by anybody without JS and it complicates things for normal users. Remember making things accessible for disabled users, also usually benefits normal users too!
I recently stumbled upon a Jewellery e-commerce site where the search field was controlled by JS.
With JS enabled when you hit return or clicked the search button it would check to make sure you entered a search term, but without JS you would hit search and nothing would happen. At which point you think you haven’t pressed the button and so franticly start clicking on it to try and make it work (why do people think clicking an elevator button multiple times will make it come faster?).
Being an e-commerce site, this immediately made me lose trust for the site and made me think about going elsewhere. This one thing may not put off all your potential customers, but four or five small things like this soon add up to make customers lose faith in the site.
- Didn’t allow me to complete my search…at all.
- Left me confused for a moment as I didn’t know it wasn’t working.
- Frustrated me.
- Made me lose confidence in the site.
All this from trying to prevent me from submitting an empty search string. The benefits certainly do not out way the negatives.
A now slightly outdated Task List application called Tweeto that frozensheep (Note: this is my company) developed does just that. It builds upon a basic working version by adding JS to make certain things faster and easier, but gracefully degrades when you have JS disabled.
Creating JS that gracefully degrades is very easy and just takes a little bit of forward planning and we will look at the various methods you should use in another post.