Prev | Current Page 777 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


The following is an example that illustrates an implementation of an auto - completion control. The
control in question is used to select a color by its name. The color names are stored on the server and a
service outputs all of the colors that have a name that begins with the passed argument string. The
response is an XML document that contains the name of the colors that satisfy the query and their hex
418
Part II: Server Side, JavaScript, and Flash: Oh My!
values. The control shows the queried colors in a list below the input control and a panel that visualizes
the selected color. The effect is illustrated in Figure 14 - 5 .
Figure 14-5
Once more the HTML page is very simple and not aware that it will be enhanced by a script.
< html >
< head >
< title > Quotation Example < /title >
< link rel=???stylesheet??? type=???text/css??? href=???main.css??? / >
< /head >
< body >
Type the Color Name: < input type=???text??? id=???colorinput??? name=???colorinput??? / >
< script type=???text/javascript??? src=???main.


Pages:
765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789