HTML5 Sample codes

Learning By Doing - Here we try to provide some sample codes and links to external resources. There is a lot of HTML5 materials.

HTML5 Webapps examples

There are many good websites. Here we shared our examples.

More HTML5 Samples

Need Help for HTML5 Webapp Development

Zetakey provides web app development service, contact us contact

Image File Picker

This is a sample let you pick a image / file from system, preview it and send to server. It use file API, FileReader.

Image File Picker

Netscape Plugin API

Sample NPAPI for PC Win32

PC plugin dll file(nptestplugin.dll) and webpage (nptest.html) to call 3 plugin sample functions. testPopUp(), testReturnInt(), and testReturnString()

  1. Create a folder under browser folder /Plugins/
  2. Save nptestplugin.dd under the /Plugins/ folder
  3. Open "nptest.html"

Plugin dll and html files

Source code

NPAPI for barcode scanner in native C

Example showing the use of NPAPI to run a background thread that invokes HTML5 browser Javascript code. In this code a hardware barcode scanner is used to read barcodes and invokes Javascript code on a windows mobile device running ZetaKey or Intermec HTML5 browser.

A NPAPI sample showing how to access a barcode scanner in native C

Play audio using NPAPI

There is a plugin available for both Intermec Browser and HTML5 Browser that can play a wav file. The wav file can be locally stored on the device or stored on a server in the same directory as the html file.

A NPAPI sample showing how to access a barcode scanner in native C

Capture Signature

This is a javascript sample to capture a signature in a canvas area. And then you can save the image as required format. There are javascript functions handle the event in the canvas area. Then it uses todataurl() in canvas html5.

Capture Signature

Offline Database

This is HTML5, javascript sample to implement DoTo list. The javascript portion created a databased by openDatabase() and then execute the query by executeSql().

Offline database

Signage Web App

It is an implemenation of HTML5 Digital Signage Application using HTML5 and Javascript. It uses HTML5 video tag, HTML5 video tag, Transparent overlay support, Marquee, Fadein / Fadeout effect

HTML5 Digital Signage