Book Image

haXe 2 Beginner's Guide

5 (1)
Book Image

haXe 2 Beginner's Guide

5 (1)

Overview of this book

Table of Contents (21 chapters)
haxe 2
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – Setting up our view


Now, let's set up our view.

As we discussed earlier, we will create it as an HTML file. We will need to define the markup to display our computers and also to add one.

Basically, we will have:

  • A table to list the computers

  • A "name" text-field to create a computer

  • An "OS" combobox

  • A "details" text-field is the OS chosen allows for more details to be given

  • An "Add" button

This file will also integrate our JavaScript generated file.

So, let's create our ComputerList.html file as follows:

<!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"/>

   <title>ComputerList</title>
   
</head>

<body>
   <!-- Our table listing computers -->
   <table id='listTable'>
      <!-- List headers --&gt...