We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Rated
Read 34,682 times

Related Categories

Dynamically Adding OPTIONS to SELECT

LACanadian

Illustrates how to add OPTIONS to a SELECT using client-side JavaScript


Feel the need to add to the options that are available in a <SELECT> tag from the browser? The code below contains an illustration of the basic technique.

Dim anOption
Set anOption = document.createElement("OPTION")
document.form1.select1.options.add anOption
anOption.innerText = "Two"
anOption.Value = "2"


 Want to do the same thing, but in JavaScript. Try the following    

var anOption = document.createElement("OPTION")
document.form1.select1.options.add(anOption)
anOption.innerText = "Two"
anOption.Value = "2"


Almost too easy, isn't it.    
 

I am the owner of a small application development consulting company that specialized in the design and implementation of Internet-based applications. While there are others who can make a web site look good, our expertise is in making the site function. This includes infrastructure design, database design and administration, software development and deployment. For the most part, we utilize Microsoft-based languages and tools. And we are skilled enough to have generated two patent applications for our clients.

Comments