How to create dropdown list?

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

    #1

    How to create dropdown list?

    Hi

    I'm using this code to change a table cell into text input:
    pole=document.c reateElement("i nput");
    pole.type="text ";
    pole.size="40";
    pole.value=""+o pis;
    pole.id="opis"+ id;
    pole.name="opis "+id;
    pole.className= "guzik1";
    document.getEle mentById("opis" +id).replaceChi ld(pole,documen t.getElementByI d("opis"+id).ch ildNodes[0]);

    This works ok but what i need is to change another table cell into dropdown
    list with 6 options
    (table cell has its id)
    Is it possible to do it in similar way?

    Thanks for help.
    Leszek


  • RobG

    #2
    Re: How to create dropdown list?


    Leszek wrote:
    Hi
    >
    I'm using this code to change a table cell into text input:
    pole=document.c reateElement("i nput");
    pole.type="text ";
    pole.size="40";
    pole.value=""+o pis;
    pole.id="opis"+ id;
    pole.name="opis "+id;
    pole.className= "guzik1";
    document.getEle mentById("opis" +id).replaceChi ld(pole,documen t.getElementByI d("opis"+id).ch ildNodes[0]);
    >
    This works ok but what i need is to change another table cell into dropdown
    list with 6 options
    (table cell has its id)
    Is it possible to do it in similar way?
    Yes, but use new Option():

    <URL:
    http://groups.google.com.au/group/co...b346a2775d8511
    >
    --
    Rob

    Comment

    Working...