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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:04:50+00:00 2026-06-01T04:04:50+00:00

Here i got a problem in my script, Once we set one radio button

  • 0

Here i got a problem in my script,

Once we set one radio button we cannot change it anymore :

$("#divAddNewNote").click(function() {
    if ($("#divAddNewNote textarea").length == 0) {
        $("#divAddNewNote div").css("display", "none");
        box += "<div class=\"noteBottomBar\">";
        box += "    <div class=\"radioPrivatePublic\">";
        box += "        <input type=\"radio\" id=\"radio1\" name=\"groupPrivate\" value=\"private\" /><label for=\"radio1\">Private</label>";
        box += "        <input type=\"radio\" id=\"radio2\" name=\"groupPrivate\" value=\"public\" /><label for=\"radio2\">Public</label>";
        box += "    </div>";
        box += "    <button onclick=\"ajaxSaveNewStatus(10886);\">Post</button>";
        box += "</div>";
        $("#divAddNewNote").append(box);

        return false;
    } else {
        return false;
    }

});​

It’s a problem in my javascript code but i cannot find it

  • 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-01T04:04:51+00:00Added an answer on June 1, 2026 at 4:04 am

    The problem is that your radio buttons are within #divAddNewNote. Your click handler for #divAddNewNote returns false. returning false in a jquery event handler has 2 functions. It is equivalent to event.preventDefault and event.stopPropagation. The important one here is the preventDefault. This is causing your attempt to change the value of the radio button to be canceled (“prevented”).

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

Sidebar

Related Questions

I've got a problem with CssSandpaper script. Once I run it on one of
Here's the problem I'm having, I've got a set of logs that can grow
Here's what I got. <script type=text/javascript> function show_confirm(id) { var r=confirm(Are you sure you
Here is my problem: I have got a Python build script that executes several
Well, here's my problem. I've got a php script which posts a message to
I got a problem similar to this one: FileSystemWatcher - only the change event
I want to ask about strcpy. I got problem here. Here is my code:
I've got a problem here with an MSI deployment that I'm working on (using
I've got a problem similar to,but subtly different from, that described here (Loading assemblies
Can't understand what is a problem here: I have got main.cpp file where I

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.