Posts Tagged ‘Javascript’

Javascript forms – textarea word count

Monday, April 5th, 2010

Happy Easter loyal readers (or possibly reader). Here’s a nice simple piece of JavaScript that counts down the number of words remaining in a restricted text field as you type. When you hit your limit and the counter hits zero you will no longer be able to type any words untill you delete some. There is no restriction here on characters and words are defined by spaces only. The example below shows it in action.

Textfield is limited to 50 words.

words remaining: 50

File’s attached as usual here – so download them, use them and together we can make HTML forms fun! (as long as you don’t have JavaScript disabled…)

Javascript image carousel

Tuesday, February 9th, 2010

Here we have a Javascript image carousel, the first completed element of the all new, currently (and probably indefinately) under construction, LANDRICAM! (v 3.0).


The Javascript is pretty customisable – allowing you to set things like image and font sizes and animation speed. Although this is hardly exhaustively tested, it seems to be pretty flexible. Now no doubt some of you will be asking ‘Why not just use one of the much prettier, robuster and more customisable JQuery modules instead of wasting countless hours cobbling this together’, well I ask you – where’s the fun in that?

Files are here – so download and spin!

Flash dynamic page titles

Tuesday, December 15th, 2009

Here’s something I knocked up for a client to keep intranet page titles in the corporate font. It’s a simple bit of Flash and AS3 embedded with some javascript. The Flash file has the relevant font embedded in a dynamic text field and the javascript passes colour and size and the word or sentence as Flashvars to render. Below is an example in Christmasy red Helvetica Neue.

The script also incorporates the AC_OETags javascript from the Adobe Flash player detection kit to replace the SWF with the specified text rendered as normal HTML if flash is not present on the users system. Download the source files and have a play.

Javascript form validation

Monday, December 14th, 2009

Quite an old one this, but I don’t want to lose momentum so i’m posting it for want of anything else. This is a good old fashioned form validation script. It’s faily customisable and uses alerts to indicate missing information. It also focuses on and highlights the relevant field. The zip file contains the javascript and a sample HTML form so you can see it in place. Enjoy.

Christmas Javascript snow

Friday, December 11th, 2009


Since I’m launching this blog during the Christmas month it seems fitting to kick it off with something festive so here’s some Javascript snow. A client wanted a snow effect on one of their pages but I struggled to find anything ready made that was remotely cross browser. So I decided to have a crack at making one myself… here’s how it looks: toggle snow. It has a few optional settings like colour, size, and the font and chacter to use for the snow – why not download it and have a play.

I’d like to think that this is a work in progress so maybe a new version will pop up at some point but in the meantime stay tuned for the next exciting episode of SCRIPTIC!