radio button within listbox

Discussion in 'Javascript' started by sudhaoncyberworld@gmail.com, Dec 30, 2005.

  1. Guest

    , Dec 30, 2005
    #1
    1. Advertisements

  2. Guest

    I'm quite sure that in raw html it's impossible. But there's a way to
    do so:

    You must create a "self control" in html that is a textbox and an image
    (an arrow) to simulate a combobox. When the image is clicked then you
    must show a popup (window.createPopup or a div that you show/hide) with
    the elements you want to show inside. Inside the popup you can have
    radiobuttons, or wathever you want.

    It's not a easy work, but if you do this control the right way, you can
    reuse several times and customize it.
     
    , Dec 30, 2005
    #2
    1. Advertisements

  3. Guest

    You can achieve that using div. Specify some height to the div and set
    its overflow property to auto, which will make the div scrollable.

    Demo code:

    <div style="height:150px; width: 150px; overflow:auto; background:
    #e5e5e5; padding:3px;">
    <input type="radio" value="" name="r1" > Option 1<br>
    <input type="radio" value="" name="r1" > Option 2<br>
    <input type="radio" value="" name="r1" > Option 3<br>
    <input type="radio" value="" name="r1" > Option 4<br>
    <input type="radio" value="" name="r1" > Option 5<br>
    <input type="radio" value="" name="r1" > Option 6<br>
    <input type="radio" value="" name="r1" > Option 7<br>
    <input type="radio" value="" name="r1" > Option 8<br>
    <input type="radio" value="" name="r1" > Option 9<br>
    <input type="radio" value="" name="r1" > Option 10<br>
    <input type="radio" value="" name="r1" > Option 11<br>
    <input type="radio" value="" name="r1" > Option 12<br>
    <input type="radio" value="" name="r1" > Option 13<br>
    <input type="radio" value="" name="r1" > Option 14<br>
    <input type="radio" value="" name="r1" > Option 15<br>
    </div>

    cheers
    Kiran M N
     
    , Dec 30, 2005
    #3
  4. Guest

    Thanx a lot
     
    , Dec 30, 2005
    #4
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DC Gringo
    Replies:
    0
    Views:
    556
    DC Gringo
    Apr 6, 2004
  2. kent
    Replies:
    1
    Views:
    1,029
    Andrew de la Harpe
    May 3, 2004
  3. Simon Prince
    Replies:
    2
    Views:
    3,583
    =?Utf-8?B?TWljaGFlbCBUYXlsb3I=?=
    Oct 19, 2004
  4. Scott D Johnson
    Replies:
    1
    Views:
    1,382
    Scott D Johnson
    Sep 27, 2006
  5. Jan C. Faerber
    Replies:
    0
    Views:
    786
    Jan C. Faerber
    Jun 30, 2009
  6. tshad
    Replies:
    6
    Views:
    10,067
    Alexey Smirnov
    Nov 26, 2009
  7. Martin
    Replies:
    8
    Views:
    3,972
    Jan C. Faerber
    Nov 24, 2009
  8. Hiten
    Replies:
    1
    Views:
    949
    Vidar Petursson
    May 26, 2004
Loading...