Reply to Re: Drop Down and textBox

Your name:

Reply:


Posted by Andrew Bailey on 01/22/08 09:52

"Go Live" <barunshrestha@gmail.com> wrote in message
news:5269f920-8322-4699-bde9-bf19ebf6c4d1@j20g2000hsi.googlegroups.com...
> 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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация