Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4594254
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:48:07+00:00 2026-05-21T22:48:07+00:00

I have 3 radio buttons <input type=radio name=preferedpaymt value=CheckMailed id=CheckMailed1 <?php if($paymnt==CheckMail) {?> checked=checked

  • 0

I have 3 radio buttons

<input  type="radio" name="preferedpaymt" value="CheckMailed" id="CheckMailed1" <?php if($paymnt=="CheckMail") {?> checked="checked" <?php }?> />
(a)Check Mailed

<input  type="radio" name="preferedpaymt" value="PayPal"  <?php if($paymnt=="PayPal") {?> checked="checked" <?php }?> />
(b)By PayPal

<input  type="radio" name="preferedpaymt" value="WireTransfer"  id="WireTransfer" <?php if($paymnt=="wireTransfer") {?> checked="checked" <?php }?> />
(c)Wire Transfer To Bank A/c$12

But the value of radiobutton is checked from database . With these 2 tables are associated
if Radiobutton 2 is checked table1 1 should populate id tb1

here the problem is when a value of radio button is checked from database the table does not get populate if you only click it gets populated i want it automatis how can i do it?

jquery code, which I am using

<script type="text/javascript">
jQuery(function () {
    jQuery("input[name=preferedpaymt]").change(function () {
        if ($(this).val() == "PayPal") {
            jQuery("#ppl").slideDown()
        } else {
            jQuery("#ppl").slideUp();
        }
    });
});
</script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T22:48:08+00:00Added an answer on May 21, 2026 at 10:48 pm

    Or you culd use:

    var chk_val = jQuery("input[name='preferedpaymt']:checked").val();
    alert(chk_val);
    

    EDIT: how to use it!

    Your inputs:

    <input  type="radio" name="preferedpaymt" value="CheckMailed" id="CheckMailed1" <?php if($paymnt=="CheckMail") {?> checked="checked" <?php }?> />
    (a)Check Mailed
    
    <input  type="radio" name="preferedpaymt" value="PayPal"  <?php if($paymnt=="PayPal") {?> checked="checked" <?php }?> />
    (b)By PayPal
    
    <input  type="radio" name="preferedpaymt" value="WireTransfer"  id="WireTransfer" <?php if($paymnt=="wireTransfer") {?> checked="checked" <?php }?> />
    (c)Wire Transfer To Bank A/c$12
    

    Then lets say you got one tables for each payment choise. ex:

    NOTE All tables has the same classname this is because i want to hide all of them by default. The id attribute is set to “table_paymentmethod”.

    <table class="payment_table" id="table_CheckMailed" height="200" bgcolor="#00FF33" width="100px;" >
    <tr>
      <td>
    
         You checked Checked mail
      </td>
    </tr>
    </table>
    
    <table class="payment_table" id="table_PayPal" height="200" bgcolor="#FF0000" width="100px;" >
    <tr>
      <td>
    
         You checked Paypal
      </td>
    </tr>
    </table>
    
    <table class="payment_table" id="table_WireTransfer" height="200" bgcolor="#CCC" width="100px;" >
    <tr>
      <td>
    
         You checked wiretransfer
    
      </td>
    </tr>
    </table>
    

    Now to the part where jquery comes in handy.

    <script type="text/javascript">
     jQuery(document).ready(function(){
            jQuery('.payment_table').hide(); // Hide all tables by default
    
            var chk_val = jQuery("input[name='preferedpaymt']:checked").val(); // Grab the value of the selected radio
    
            jQuery('#table_'+chk_val).slideDown(1000); // Slides down the right table on page load.
      });
    </script>
    

    Well there you go, should do the trick for you. Im not the best at explaining but it should be pretty straightforward.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some radio buttons <div id=typeRadios> <input id=character_chartype_a name=character[chartype] type=radio value=A /><label for=character_chartype_a>A</label>
I have the following HTML <form id=create_form name=create_form action= method=post> <input name=type id=type value=individuel
So I have lots of radio buttons with same name but different ID and
Possible Duplicate: add an image to a html type input check box or radio
I've got a form where I have two radio buttons and two interchangeable controls
I have a set of radio buttons where a selection is required. In addition,
I have a form with some radio buttons that are disabled by default. When
I have a swing application that includes radio buttons on a form. I have
I have a form which contains a 'gender' label and two radio buttons'male' and
I have a list of 3 radio buttons with the 1st radio that's selected

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.