Pre-Set Up:
Confirm that the "list ports" button outputs your serial ports: here. If it doesn't go through the instructions again.
Confirm that the serial port is running on your arduino (open serial monitor in the Arduino software)
Some sample code for a sensor on pin 0 in the Arduino
void setup(){
Serial.begin(9600);
}
void loop(){
int input = analogRead(0);
Serial.print(input, BYTE);
delay(50);
}
Try this on one of the examples: here
Do your own
create a folder with the JSSerial.jar and jsserial-applet.jnlp along with your own HTML/JavaScript file.
edit the jsserial-applet.jnlp to put in your own "href" and "codebase" values depending on where you put your files.
See this for a barebones sample. If it runs correctly when you press the button, the serial monitor values will run on your screen.
Please note: if you have more than one javascript serial page open it will confuse the sytem, ONLY ONE PAGE OPEN AT A TIME.