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 6233919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:23:24+00:00 2026-05-24T10:23:24+00:00

I have included my two code sources below. The problem that I am having

  • 0

I have included my two code sources below.

The problem that I am having is that if you click one of the radio buttons (radio-group is the ID of the group of buttons), the previously ‘checked’ option does not deselect and the new ‘checked’ option does not get selected. Instead what happens is that the selector click event happens and the ‘checked’ option remains the same.

How do I fix this? I have tried clearing the ‘checked’ option whenever a new option is ‘checked’ and then checking that option via Javascript, but I have am not having any success.

Thoughts?

Thanks!

Javascript code:

$(function() {

$("#paid-content-box").hide();
$("#general-settings").show();
$("#individual-box-prices").hide();
$("#paypal-preference").hide();

$("#general-settings-link a").click(function() {
    $("#paid-content-box").hide();
    $("#general-settings").show();
    return false;
});

$("#paid-content-settings-link a").click(function() {
    $("#paid-content-box").show();
    $("#general-settings").hide();
    return false;
});

$("input#somepaid").click(function() {  
    document.forms['paidContentForm'].elements['perbox'].disabled = true;
    $("#individual-box-prices").show();
    $("#paypal-preference").show();
    return false;
});

$("input#allfree").click(function() {
    document.forms['paidContentForm'].elements['perbox'].disabled = true;
    $("#individual-box-prices").hide();
    $("#paypal-preference").hide();
    return false;
}); 

$("input#subscription").click(function() {  
    document.forms['paidContentForm'].elements['perbox'].disabled = false;
    $("#individual-box-prices").hide();
    $("#paypal-preference").show();
    return false;
}); 

});

HTML/PHP Code:

<div id="paid-content-box" align="left">
<form name="paidContentForm" action="" method="post">
<h2>Set Your group / Box Prices</h2>
<div id="radio-group" class="radiogroup">
<input id="allfree" type="radio" name="boxprices" value="allfree" checked><label for="allfree">All boxes are free.</label><br />
<input id="subscription" type="radio" name="boxprices" value="subscription"><label for="subscription">Subscription pricing (all paid).</label>
<label for="perbox">Enter price per box: $</label><input id="perbox" type="text" name="subscriptionpriceper" disabled="true"><br />
<input id="somepaid" type="radio" name="boxprices" value="somepaid"><label for="somepaid">Some of the boxes are free and some our paid content.  (Please set the price for each box in the textboxes that will appear below.)</label>
</div>
<div id="individual-box-prices">
<h3>Set Individual Box Prices</h3>
<table id="pricetable">
<tr>
<th>Box Name</th>
<th>Free/Paid</th>
<th>Price</th>
</tr>

<? foreach($boxInfo as $newBox){ ?>
    <tr>
    <td><? echo $newBox['name']?></td>
    <td><span id="box_<? echo $newBox['id']?>_free">Free</span> | <span id="box_<? echo $newBox['id']?>_paid"><a href="javascript:freePaidOption(<? echo $newBox['id']?>, 'paid')">Paid</a></span></td>
    <td><label for="box_<? echo $newBox['id']?>_price">$</label><input id="box_<? echo $newBox['id']?>_price" type="text" name="box_<? echo $newBox['id']?>_price" value="" disabled="true"></td>
    </tr>
    <input type="hidden" name="defaultFreePaid_<? echo $newBox['id']?>" value=""/>
<? } ?>

</table>
</div>
<div id="paypal-preference">
<h3>Payment Preferences</h3>
<label for="paypalemail">Enter your PayPal account email address:</label><input type="text" id="paypalemail" name="paypalemail">
</div>
<br /><br />
<input type="submit" name="SavePaidContent" value="Save" class="inputText">
</form>
</div>
  • 1 1 Answer
  • 1 View
  • 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-24T10:23:25+00:00Added an answer on May 24, 2026 at 10:23 am

    All of your event handlers return false. That prevents the default action, which is to change the selected radio button.

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

Sidebar

Related Questions

I want to be able to have two projects, one that contains production code
I have two separete c# projects. One is a helper library that is included
I have a rails module included for reference below that I have included using
I have a RadioButtonList with two ListItems included: <asp:RadioButtonList runat=server ID=optRollover OnSelectedIndexChanged=RolloverOptionSelected AutoPostBack=true> <asp:ListItem
I have two classes, and want to include a static instance of one class
I have included <zlib.h> in my iphone application and the source code I was
I have included a resource in my Visual Studio 2005 solution that was a
I have inherited a DotNetNuke codebase and have come across areas that have included
I have a pagination script which I have posted below, the problem is I
Do you know of any compilers that only requires one or two clicks on

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.