Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pocket PC IE Create new listitem in listbox?

Status
Not open for further replies.

xpblueScreenOfDeath

Programmer
Sep 1, 2004
87
How do I create a new list item in a listbox in javascript? I tried the follow but it doesn't work in Pocket PC IE.

Code:
list.options[list.options.length] = new Option('text', 'value');
 

Try the DOM method instead:

Code:
list.options.add(new Option('text', 'value'));

You should really be asking this in the JavaScript forum, btw.

Hope this helps,
Dan

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top