Javascript on form typing

Soldato
Joined
27 Dec 2005
Posts
17,316
Location
Bristol
I've got a basic booking form (backend PHP) to use at an exhibition. I'm looking to make everything a bit quicker and easier by implementing some Javascript.

The two main things I want to do are:

  • Add up a "cost" variable based on certain tick boxes and/or field entries.
  • Check the database if a date is taken when selected (much like username fields on various sites).

I'm an absolute novice when it comes to JS so if someone could point me in the right direction that'd be great. From these I should be able to alter them and do anything else I need.

Thanks! :)
 
Use the jQuery library to make your life (and cross-browser compabilitlity) much easier. http://jquery.com/

It provides lots of very useful functions, which should make things like checking when checkboxes are checked in very simple.

edit: you can also use the excellent jQuery Validation plug-in to have javascript error checking too.

Thanks - I've "installed" jQuery but I'm still none the wiser :p.
 
Back
Top Bottom