O'Reilly logo

haXe 2 by Benjamin Dasnois

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action—Using events from the DOM level 0

We are going to write a small example of using events from the DOM level 0.

In this example, we will have a table listing a user's first and last name. We will also have a simple form to add a user to the list. Everything will be managed only by JavaScript.

So, at first, let's create our HTML file with the markup for the table presenting our list of users and for our little form too.

We will also load our haXe generated JavaScript file:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required