remove options

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Crescionini Sascha

    remove options


    hello ng

    is there an easy and fast way to remove/delete ALL options in a
    dropdown-list?
    if possible, i dont want to check the existing values, just ban all out of
    this dropdown
    to get a clean empty dropdown ;)

    thanx for support

    sascha


  • Martin Honnen

    #2
    Re: remove options



    Crescionini Sascha wrote:[color=blue]
    > hello ng
    >
    > is there an easy and fast way to remove/delete ALL options in a
    > dropdown-list?
    > if possible, i dont want to check the existing values, just ban all out of
    > this dropdown
    > to get a clean empty dropdown ;)[/color]

    <form name="formName" >
    <select name="selectNam e"

    then you can delete options with
    document.formNa me.selectName.o ptions.length = 0

    --

    Martin Honnen


    Comment

    • Crescionini Sascha

      #3
      Re: remove options


      great!! thanx!

      sascha :)

      "Martin Honnen" <Martin.Honnen@ t-online.de> wrote in message
      news:3f7440db$1 @olaf.komtel.ne t...[color=blue]
      >
      >
      > Crescionini Sascha wrote:[color=green]
      > > hello ng
      > >
      > > is there an easy and fast way to remove/delete ALL options in a
      > > dropdown-list?
      > > if possible, i dont want to check the existing values, just ban all out[/color][/color]
      of[color=blue][color=green]
      > > this dropdown
      > > to get a clean empty dropdown ;)[/color]
      >
      > <form name="formName" >
      > <select name="selectNam e"
      >
      > then you can delete options with
      > document.formNa me.selectName.o ptions.length = 0
      >
      > --
      >
      > Martin Honnen
      > http://JavaScript.FAQTs.com/
      >[/color]


      Comment

      Working...