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

  • SEARCH
  • Home
  • 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 7751631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:35:53+00:00 2026-06-01T11:35:53+00:00

When a user clicks the Upload Prize radio button, jQuery should show #upload_prize_file_box input

  • 0

When a user clicks the Upload Prize radio button, jQuery should show #upload_prize_file_box input. When a user clicks the Provide Access radio button, pa_block should be shown.

When I try to do that using the code below, the page doesn’t respond.

HTML:

<tr>
 <td id="optBox">
    <input name="opt-radio" type="radio" id="upload_prize" value="upload_prize" checked="checked" />
    <label for="upload_prize">Upload Prize</label>
    <input name="opt-radio" type="radio" id="provide_access" value="provide_access" />
    <label for="provide_access">Provide Access</label>
 </td>
</tr>
<tr>
 <td id="upload_prize_file_box" colspan="2" style="display:none;">
     <input type="file" name="upload_prize_file" id="upload_prize_file" />
 </td>
</tr>
<tr>
 <td height="160" colspan="2" id="pa_block" style="display:none;">
     <table width="100%" border="0">
     <tr>
       <td width="32%">URL</td>
       <td width="68%"><input type="text" name="pa_url" id="pa_url" /></td>
     </tr>
     <tr>
       <td>Username</td>
       <td><input type="text" name="pa_username" id="pa_username" /></td>
     </tr>
     <tr>
       <td>Password</td>
       <td><input type="text" name="pa_password" id="pa_password" /></td>
     </tr>
     <tr>
       <td>Is your prize attached to an affiliate program in Clickbank?</td>
       <td>
            <input type="radio" name="radio" id="pa_yes" value="pa_yes" />
            <label for="pa_yes">Yes</label>
            <input type="radio" name="radio" id="pa_no" value="pa_no" />
            <label for="pa_no">No</label>
       </td>
      </tr>
      <tr>
        <td colspan="2">
            <textarea name="pa_textarea" id="pa_textarea" cols="45" rows="5"></textarea>
        </td>
       </tr>
       <tr>
          <td height="29" colspan="2">Enter hoplink with our affiliate code, which is: iasst</td>
       </tr>
</table>
</td>

jQuery:

$(document).ready(function() {
    if("#optBox input[type=radio]").click(function(){
        if($("input[type=radio]:checked","optBox").val()=='upload_prize'){
            $("#upload_prize_file_box").show();
            $("#pa_block").css('display','none');
        }
        if($("input[type=radio]:checked","optBox").val()=='provide_access'){
            $("#pa_block").show();
            $("#upload_prize_file_box").css('display','none');
        }
    });
});

http://jsfiddle.net/GSXQ5/

How can I activate my radio buttons?

  • 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-06-01T11:35:54+00:00Added an answer on June 1, 2026 at 11:35 am

    Here, I fixed it for you: http://jsfiddle.net/GSXQ5/29/.

    You missed the <table> tag, and the $ symbol several times; in the second line of your jQuery code, you have typed if instead of $.

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

Sidebar

Related Questions

I've made a page which should show a div when the user clicks on
I have implemented a simple file upload-download mechanism. When a user clicks a file
Details: Only disable after user clicks the submit button, but before the posting back
When a user clicks a submit button I want the form to be submitted.
When the user clicks a button, I want his browser to automatically scroll to
In my website, user have to upload a file, and should have two buttons
I have a template where the user can input data about himself, and upload
I have a user control with a button named upload in it. The button
I have a a form which contains a file input, upload button and cancel
When user clicks on select box , I want to hide the options menu

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.