[thelist] select list

Peter-Paul Koch gassinaumasis at hotmail.com
Sun Jan 5 11:01:01 CST 2003


>but it doesn't show me how to add another option to be the first without
>replacing the first one. With the code i provided, it adds the option at
>the end.

oOption[0] = new Option (etc.)

--------------------------------------------------
ppk, freelance web developer
Interaction, copywriting, JavaScript, integration
http://www.xs4all.nl/~ppk/
Column "Keep it Simple": http://www.digital-web.com/columns/keepitsimple/
Nieuw: Jaaroverzicht 2002
http://www.naarvoren.nl/artikel/jaaroverzicht_2002.html
--------------------------------------------------


> >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
>need.
>
> >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
>details.
>
>--------------------------------------------------
>ppk, freelance web developer
>Interaction, copywriting, JavaScript, integration
>http://www.xs4all.nl/~ppk/
>Column "Keep it Simple": http://www.digital-web.com/columns/keepitsimple/
>Nieuw: Jaaroverzicht 2002
>http://www.naarvoren.nl/artikel/jaaroverzicht_2002.html
>--------------------------------------------------
>
>
>_________________________________________________________________
>MSN 8 with e-mail virus protection service: 2 months FREE*
>http://join.msn.com/?page=features/virus
>
>--
>* * Please support the community that supports you.  * *
>http://evolt.org/help_support_evolt/
>
>For unsubscribe and other options, including the Tip Harvester
>and archives of thelist go to: http://lists.evolt.org
>Workers of the Web, evolt !
>
>
>--
>* * Please support the community that supports you.  * *
>http://evolt.org/help_support_evolt/
>
>For unsubscribe and other options, including the Tip Harvester
>and archives of thelist go to: http://lists.evolt.org
>Workers of the Web, evolt !


_________________________________________________________________
Help STOP SPAM: Try the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail




More information about the thelist mailing list