View Single Post
Old 05-31-2007, 11:02 PM   #1 (permalink)
adammc
Junior Member
 
Join Date: 12-21-06
Posts: 2
iTrader: 0 / 0%
Latest Blog:
None

adammc is liked by many
Ajax / Javascript Form Help

Hi folks,

Could any one tell me please if it is possible to make a radio button that shows a text input field only when it is checked?

example:


PHP Code:
<tr>
        <
td valign='center'>Payment Method: </td>
        <
td valign='center'>
        <
input type=radio name="payment_method" class="radio" value="paymate" />Paymate &nbsp
        <
input type=radio name="payment_method" class="radio" value="paypal" />Paypal </td>
</
tr
If the user selects the paymate radio button the following would display / show on the page:

PHP Code:
<tr>
<
td width="133">Paymate ID</td><td width="148"><input type="text" name="paymate_id" size="20"></td>
</
tr
If the user selects the paypal radio button the following would display:

PHP Code:
<tr>
<
td width="133">Paypal ID</td><td width="148"><input type="text" name="paypal_id" size="20"></td>
</
tr
Any advice would be greatly appeciated
adammc is offline   Reply With Quote