ArduGate is an open-source web gateway software I am developing, for interfacing Arduino with JavaScript. It is actually made up of a serial-to-HTTP gateway (based on my miniweb project), some JavaScript routines performing communication with AJAX and an agent sketch running on Arduino. It makes interaction between in-browser JavaScript and Arduino possible, and thus makes developing a up-stream application for Arduino that runs on any platform with a browser a lot easier.

You can find more information and download it on the project homepage.Right now access to following Arduino APIs/objects are implemented:

pinMode

digitalRead/digitalWrite

analogRead/analogWrite

EEPROM (read/write)

Servo (attach/detach/read/write)

The key concept is using JavaScript inside the web browser to interact with Arduino. Here are several demostrating JavaScript code clips. You will find the code similar to that in an ordinary Arduino sketch.