Drop Down and textBox

Discussion in 'HTML' started by Go Live, Jan 21, 2008.

  1. Go Live

    Go Live Guest

    HI,

    I am trying to include textbox and dropdown in a single cell. The
    things goes like this there is one radio button for textbox and one
    radio button for dropdown. Now when the user click one radio button
    texbox should appear in a <td> cell and when other radio button is
    clicked dropdown should appear in the same cell<td> by removing the
    textbox and viceversa.

    The code goes like this:
    <table ID="Table">
    <tr>
    <td></td>
    <td><input type="radio" </td>
    <td><label>Radio button for text Box</label></td>
    <td width="10"></td>
    <td><input type="radio" </td>
    <td><label>Radio Button for Drop Down</label></td>
    <td></td>
    </tr>
    <tr>
    <td><label>Choose</label></td>
    <td>
    <input type="text" ID="txtKeyword"
    NAME="txtKeyword">
    </td>
    </td>
    <select name="dropdown" style="font-size:10px;">
    <option value="1">AAAA</option>
    <option value="2">BBBB</option>
    <option value="3">CCCC</option>

    </select>

    </td>

    </tr>
    <tr>

    <td><img src="Search"></td>
    </tr>
    </table>

    Any suggestions or good examples will be very much appreciated.

    Thanks
    Go Live, Jan 21, 2008
    #1
    1. Advertising

  2. Go Live

    John Hosking Guest

    Go Live wrote:
    >
    > I am trying to include textbox and dropdown in a single cell.


    One wonders why.

    > The
    > things goes like this there is one radio button for textbox and one
    > radio button for dropdown. Now when the user click one radio button
    > texbox should appear in a <td> cell and when other radio button is
    > clicked dropdown should appear in the same cell<td> by removing the
    > textbox and viceversa.
    >
    > The code goes like this:


    I have snipped your code for the following reasons:
    1) You should have posted a URL to your page (preferably a simplified
    test page, validated) as is customary here, instead of posting code.
    2) This code is poorly formatted for usenet. Why do we need a nine-TAB
    indent? This is hard to read.
    3) This code is invalid. Visit http://validator.w3.org/
    4) This code doesn't seem to be an attempt to place a textbox and
    dropdown in a single cell. It looks like you want them in *different*
    cells. But you've got an extra </td> which probably ought to be a <td>
    and with messed-up code like this it's not easy to help you anyway.

    You don't seem to have researched this much. Maybe if you have a read
    through http://www.w3.org/TR/html4/interact/forms.html it'll help you.


    --
    John
    Foolishly ignoring the UIP: http://improve-usenet.org/
    John Hosking, Jan 21, 2008
    #2
    1. Advertising

  3. Go Live

    Go Live Guest

    I am sorry for this. But if you get an idea of what i am trying to
    tell here then please post some good examples. Please don't go with
    the above HTML code its just a rough piece of code to give some idea
    of what i am looking for.

    Thank you very much.
    Go Live, Jan 21, 2008
    #3
  4. Gazing into my crystal ball I observed Go Live <>
    writing in news:4afde53f-ea69-4e7a-b492-ea5da70471f5
    @l1g2000hsa.googlegroups.com:

    > I am sorry for this. But if you get an idea of what i am trying to
    > tell here then please post some good examples. Please don't go with
    > the above HTML code its just a rough piece of code to give some idea
    > of what i am looking for.
    >
    > Thank you very much.
    >
    >


    What are you replying to? Please understand that you are posting to a
    Usenet group - not a message board. Some news servers may not have all
    messages, so it is important to always quote to what you are referring,
    trimming as necessary.


    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Jan 22, 2008
    #4
  5. "Go Live" <> wrote in message
    news:...
    > HI,
    >
    > I am trying to include textbox and dropdown in a single cell. The
    > things goes like this there is one radio button for textbox and one
    > radio button for dropdown. Now when the user click one radio button
    > texbox should appear in a <td> cell and when other radio button is
    > clicked dropdown should appear in the same cell<td> by removing the
    > textbox and viceversa.
    >
    > The code goes like this:
    > <table ID="Table">
    > <tr>
    > <td></td>
    > <td><input type="radio" </td>
    > <td><label>Radio button for text Box</label></td>
    > <td width="10"></td>
    > <td><input type="radio" </td>
    > <td><label>Radio Button for Drop Down</label></td>
    > <td></td>
    > </tr>
    > <tr>
    > <td><label>Choose</label></td>
    > <td>
    > <input type="text" ID="txtKeyword"
    > NAME="txtKeyword">
    > </td>
    > </td>
    > <select name="dropdown" style="font-size:10px;">
    > <option value="1">AAAA</option>
    > <option value="2">BBBB</option>
    > <option value="3">CCCC</option>
    >
    > </select>
    >
    > </td>
    >
    > </tr>
    > <tr>
    >
    > <td><img src="Search"></td>
    > </tr>
    > </table>
    >
    > Any suggestions or good examples will be very much appreciated.
    >
    > Thanks


    Here's a rough example that should get you going...

    <script>
    function showtext(){
    document.getElementById('text').style.display='inline';
    document.getElementById('menu').style.display='none';
    }
    function showmenu(){
    document.getElementById('menu').style.display='inline';
    document.getElementById('text').style.display='none';
    }
    </script>



    <table>
    <tr>
    <td>Check this box for TEXT INPUT</td>
    <td><input type="radio" onclick="showtext()"></td>
    <td rowspan="2">
    <div id="text" style="display: inline">
    <input type="text" ID="txtKeyword" NAME="txtKeyword">
    </div>
    <div id="menu" style="display: none">
    <select name="dropdown" style="font-size:10px;">
    <option value="1">AAAA</option>
    <option value="2">BBBB</option>
    <option value="3">CCCC</option>
    </select>
    </div>
    </td>
    </tr>
    <td>Check this box for DROPDOWN MENU</td>
    <td><input type="radio" onclick="showmenu()"></td>
    </tr>
    </table>

    Hope this helps

    Andy
    Andrew Bailey, Jan 22, 2008
    #5
    1. Advertising

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. SirPoonga
    Replies:
    2
    Views:
    759
    Ben Strackany
    Jan 7, 2005
  2. weiwei
    Replies:
    0
    Views:
    1,014
    weiwei
    Jan 5, 2007
  3. msimmons
    Replies:
    0
    Views:
    473
    msimmons
    Jul 16, 2009
  4. Replies:
    5
    Views:
    267
  5. Replies:
    3
    Views:
    285
Loading...

Share This Page