595Chapter 26 .Select, Option, and (Web hosting rating) FileUpload Objects Flying

595Chapter 26 .Select, Option, and FileUpload Objects

Flying Select Options

Choose a palette size: Three Six

Choose geek level: Plain-language Gimme hex-triplets!

Select a color:

In an effort to make this code easily maintainable, the color choice lists (one in plain language, the other in hexadecimal triplet color specifications) are established as two separate arrays. Repeat loops in both large functions can work with these arrays no matter how big they get. The first two radio buttons (see Figure 26-1) trigger the setLang()function. This function s first task is to extract a reference to the SELECT object to make additional references shorter (just listObj). Then by way of the length property, you find out how many items are currently displayed in the list because you just want to replace as many items as are already there. In the repeat loop, you set the text property of the existing SELECT options to corresponding entries in either of the two array listings. SELECT
Check Tomcat Web Hosting services for best quality webspace to host your web application.

Leave a Reply