[thelist] select list

Peter-Paul Koch gassinaumasis at hotmail.com
Fri Jan 3 08:26:01 CST 2003

>if i have the following select list:
>how can i add another option e.g. <option value='4'>steve</option> so that
>it comes to first position without replacing <option value='1'>1</option>
>using  javascript i.e.

See http://www.xs4all.nl/~ppk/js/index.html?options.html for the code you

>based on the js code below:
>			var oOption;
>			oOption = opener.document.Call.numbers.options;
>			oOption[oOption.length - 1].text = 'steve';
>			oOption[oOption.length - 1].value = 4;

You aren't creating a new Option object. See the page above for more

ppk, freelance web developer
Interaction, copywriting, JavaScript, integration
Column "Keep it Simple": http://www.digital-web.com/columns/keepitsimple/
Nieuw: Jaaroverzicht 2002

MSN 8 with e-mail virus protection service: 2 months FREE*

More information about the thelist mailing list